mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
openh264dec: Drop current frame if passing it to the decoder caused an error
Otherwise we will get it again later for output, however this frame will never actually be output so we will shift timestamps. This is especially bad if we're handling a live stream where the first frames are not keyframes. We would output the keyframe with the timestamp of the first frame, and everything would be too late when arriving in the sink.
This commit is contained in:
parent
a04c48fec1
commit
d1eb5f727c
1 changed files with 3 additions and 0 deletions
|
@ -234,6 +234,9 @@ gst_openh264dec_handle_frame (GstVideoDecoder * decoder,
|
|||
}
|
||||
|
||||
gst_buffer_unmap (frame->input_buffer, &map_info);
|
||||
if (ret != dsErrorFree)
|
||||
return gst_video_decoder_drop_frame (decoder, frame);
|
||||
|
||||
gst_video_codec_frame_unref (frame);
|
||||
frame = NULL;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue