summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-08-30 09:05:43 +0200
committerEdward Hervey <edward@collabora.com>2013-08-30 09:05:43 +0200
commit865ad4cdad87ff088e983e5dab08d2ec33fc29f4 (patch)
tree3fb9ae1864df2f36fb238b250dc5c46fff812209
parentdf287fe250e7d1617766fc4a325ee3a00105f78b (diff)
h264parse: Use codecparsers macros
note: I/SI also covers the S_I/S_SI variants
-rw-r--r--gst/videoparsers/gsth264parse.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 47b9c676f..48dcadd00 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -576,16 +576,8 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
"parse result %d, first MB: %u, slice type: %u",
pres, slice.first_mb_in_slice, slice.type);
if (pres == GST_H264_PARSER_OK) {
- switch (slice.type) {
- case 2:
- case 4:
- case 7:
- case 9:
- h264parse->keyframe |= TRUE;
-
- default:
- break;
- }
+ if (GST_H264_IS_I_SLICE (&slice) || GST_H264_IS_SI_SLICE (&slice))
+ h264parse->keyframe |= TRUE;
}
}
if (G_LIKELY (nal_type != GST_H264_NAL_SLICE_IDR &&