openh264: Use DecodeFrameNoDelay() API instead of DecodeFrame2

Replace legacy usage of DecodeFrame2 API in favour of the
recommended DecodeFrameNoDelay()

This fixes problems with DecodeFrame2() not (currently) returning
all frames in main/high streams with B-frames, and reduces latency -
previously openh264 would not return a decoded frame until the next
call to DecodeFrame2(). DecodeFrameNoDelay() returns them immediately.
This commit is contained in:
Jan Schmidt 2019-01-04 02:53:33 +11:00
parent 278cd35695
commit 40de7e5b98

View file

@ -274,7 +274,7 @@ gst_openh264dec_handle_frame (GstVideoDecoder * decoder,
GST_TIME_ARGS (frame->pts), (guint64) frame->system_frame_number);
ret =
openh264dec->decoder->DecodeFrame2 (map_info.data, map_info.size,
openh264dec->decoder->DecodeFrameNoDelay (map_info.data, map_info.size,
yuvdata, &dst_buf_info);
gst_buffer_unmap (frame->input_buffer, &map_info);