mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-15 12:34:15 +00:00
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:
parent
ac681a6efd
commit
5cce89b048
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue