h26{4,5}parse: Don't confuse nal of codec_data with frame

vps/sps/pps in codec_data shouldn't be considered as inband data.
Otherwise, h26{4,5}parse never insert them to nal when transform
(packetized to byte-stream) use case
This commit is contained in:
Seungha Yang 2018-12-01 22:42:53 +09:00 committed by Edward Hervey
parent 0842187e6e
commit 8766a45ee4
2 changed files with 9 additions and 0 deletions

View file

@ -2714,6 +2714,10 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
gst_buffer_unmap (codec_data, &map);
gst_buffer_replace (&h264parse->codec_data_in, codec_data);
/* don't confuse codec_data with inband sps/pps */
h264parse->have_sps_in_frame = FALSE;
h264parse->have_pps_in_frame = FALSE;
} else if (format == GST_H264_PARSE_FORMAT_BYTE) {
GST_DEBUG_OBJECT (h264parse, "have bytestream h264");
/* nothing to pre-process */

View file

@ -2310,6 +2310,11 @@ gst_h265_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
}
}
gst_buffer_unmap (codec_data, &map);
/* don't confuse codec_data with inband vps/sps/pps */
h265parse->have_vps_in_frame = FALSE;
h265parse->have_sps_in_frame = FALSE;
h265parse->have_pps_in_frame = FALSE;
} else {
GST_DEBUG_OBJECT (h265parse, "have bytestream h265");
/* nothing to pre-process */