codecparsers: Initialise nalu extension type to NONE

Always set a default NALU extension type, and override it
when we find a supported extension, to avoid having it unset/random
for unsupported NALU extensions
This commit is contained in:
Jan Schmidt 2014-10-29 22:23:02 +10:00
parent cc71119539
commit 86b948587e

View file

@ -215,6 +215,8 @@ gst_h264_parse_nalu_header (GstH264NalUnit * nalu)
nalu->idr_pic_flag = (nalu->type == 5 ? 1 : 0);
nalu->header_bytes = 1;
nalu->extension_type = GST_H264_NAL_EXTENSION_NONE;
switch (nalu->type) {
case GST_H264_NAL_PREFIX_UNIT:
case GST_H264_NAL_SLICE_EXT:
@ -241,7 +243,6 @@ gst_h264_parse_nalu_header (GstH264NalUnit * nalu)
nalu->header_bytes += 3;
break;
default:
nalu->extension_type = GST_H264_NAL_EXTENSION_NONE;
break;
}