mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
h264parse: Add the missing timestamp when splitting a frame.
When splitting a frame, the gst_buffer_copy_region() does not copy the timestamp correctly for sub frames when the offset is not 0. We still need those timestamps for each output sub frame. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3448>
This commit is contained in:
parent
76eb870251
commit
dae73d6686
1 changed files with 4 additions and 0 deletions
|
@ -1275,6 +1275,10 @@ gst_h264_parse_handle_frame_packetized (GstBaseParse * parse,
|
|||
tmp_frame.overhead = frame->overhead;
|
||||
tmp_frame.buffer = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL,
|
||||
nalu.offset, nalu.size);
|
||||
/* Don't lose timestamp when offset is not 0. */
|
||||
GST_BUFFER_PTS (tmp_frame.buffer) = GST_BUFFER_PTS (buffer);
|
||||
GST_BUFFER_DTS (tmp_frame.buffer) = GST_BUFFER_DTS (buffer);
|
||||
GST_BUFFER_DURATION (tmp_frame.buffer) = GST_BUFFER_DURATION (buffer);
|
||||
|
||||
/* Set marker on last packet */
|
||||
if (nl + nalu.size == left) {
|
||||
|
|
Loading…
Reference in a new issue