From 40de7e5b9832575c45cd288b548acd44ca326ed5 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 4 Jan 2019 02:53:33 +1100 Subject: [PATCH] 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. --- ext/openh264/gstopenh264dec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openh264/gstopenh264dec.cpp b/ext/openh264/gstopenh264dec.cpp index afc4d2f520..aafccf0e43 100644 --- a/ext/openh264/gstopenh264dec.cpp +++ b/ext/openh264/gstopenh264dec.cpp @@ -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);