From: Seungha Yang Date: Thu, 20 Dec 2018 03:37:43 +0000 (+0900) Subject: nvdec: Fix possible frame drop on EOS X-Git-Tag: 1.16.2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0b18f33e6dc97600b41ffa4662b01bf2e90bc13;p=platform%2Fupstream%2Fgst-plugins-bad.git nvdec: Fix possible frame drop on EOS On eos, baseclass videoencoder call finish() vfunc instead of drain() --- diff --git a/sys/nvdec/gstnvdec.c b/sys/nvdec/gstnvdec.c index 2bc44d24e..ad6c330fe 100644 --- a/sys/nvdec/gstnvdec.c +++ b/sys/nvdec/gstnvdec.c @@ -215,6 +215,7 @@ static gboolean gst_nvdec_src_query (GstVideoDecoder * decoder, GstQuery * query); static gboolean gst_nvdec_flush (GstVideoDecoder * decoder); static GstFlowReturn gst_nvdec_drain (GstVideoDecoder * decoder); +static GstFlowReturn gst_nvdec_finish (GstVideoDecoder * decoder); static GstStaticPadTemplate gst_nvdec_sink_template = GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SINK_NAME, @@ -261,6 +262,7 @@ gst_nvdec_class_init (GstNvDecClass * klass) video_decoder_class->src_query = GST_DEBUG_FUNCPTR (gst_nvdec_src_query); video_decoder_class->drain = GST_DEBUG_FUNCPTR (gst_nvdec_drain); video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_nvdec_flush); + video_decoder_class->finish = GST_DEBUG_FUNCPTR (gst_nvdec_finish); element_class->set_context = GST_DEBUG_FUNCPTR (gst_nvdec_set_context); } @@ -1010,6 +1012,14 @@ gst_nvdec_drain (GstVideoDecoder * decoder) return handle_pending_frames (nvdec); } +static GstFlowReturn +gst_nvdec_finish (GstVideoDecoder * decoder) +{ + GST_DEBUG_OBJECT (decoder, "finish"); + + return gst_nvdec_drain (decoder); +} + static gboolean gst_nvdec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query) {