Commit c1a95734 authored by Seungha Yang's avatar Seungha Yang 🐑
Browse files

nvdec: Implement finish to drain all buffers on eos

On eos, baseclass videoencoder call finish() vfunc instead of drain()
parent 55f24c51
......@@ -148,6 +148,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,
......@@ -197,6 +198,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);
}
......@@ -1041,6 +1043,14 @@ gst_nvdec_drain (GstVideoDecoder * decoder)
return nvdec->last_ret;
}
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)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment