h264parse: use proper NALU offset for config data insertion

... which has to be the position of the start code, which is almost always
but need not be 4 bytes.
This commit is contained in:
Mark Nauwelaerts 2012-02-15 14:29:23 +01:00
parent ac681a6efd
commit 5cce89b048

View file

@ -522,7 +522,7 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
if (h264parse->format == GST_H264_PARSE_FORMAT_AVC)
h264parse->sei_pos = gst_adapter_available (h264parse->frame_out);
else
h264parse->sei_pos = nalu->offset - 4;
h264parse->sei_pos = nalu->sc_offset;
GST_DEBUG_OBJECT (h264parse, "marking SEI in frame at offset %d",
h264parse->sei_pos);
}
@ -565,7 +565,7 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
if (h264parse->format == GST_H264_PARSE_FORMAT_AVC)
h264parse->idr_pos = gst_adapter_available (h264parse->frame_out);
else
h264parse->idr_pos = nalu->offset - 4;
h264parse->idr_pos = nalu->sc_offset;
GST_DEBUG_OBJECT (h264parse, "marking IDR in frame at offset %d",
h264parse->idr_pos);
}