diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-06-17 10:59:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-06-17 10:59:45 +0300 |
commit | 198e31355f42bbbab7450a8fea42b725a3b890e4 (patch) | |
tree | d6d61b7e29331bf724a409cba539b35eb8c1951e /omx | |
parent | 94789f19cf83cb238c35b060bb2d7214ba2d2a74 (diff) | |
download | gst-omx-198e31355f42bbbab7450a8fea42b725a3b890e4.tar.gz |
omxvideodec: Implement ::drain() virtual method
https://bugzilla.gnome.org/show_bug.cgi?id=767641
Diffstat (limited to 'omx')
-rw-r--r-- | omx/gstomxvideodec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 39903d3..f2d51de 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -75,7 +75,7 @@ static GstFlowReturn gst_omx_video_dec_finish (GstVideoDecoder * decoder); static gboolean gst_omx_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query); -static GstFlowReturn gst_omx_video_dec_drain (GstOMXVideoDec * self); +static GstFlowReturn gst_omx_video_dec_drain (GstVideoDecoder * decoder); static OMX_ERRORTYPE gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self); @@ -119,6 +119,7 @@ gst_omx_video_dec_class_init (GstOMXVideoDecClass * klass) video_decoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_omx_video_dec_handle_frame); video_decoder_class->finish = GST_DEBUG_FUNCPTR (gst_omx_video_dec_finish); + video_decoder_class->drain = GST_DEBUG_FUNCPTR (gst_omx_video_dec_drain); video_decoder_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_omx_video_dec_decide_allocation); @@ -1875,7 +1876,7 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder, GST_DEBUG_OBJECT (self, "Need to disable and drain decoder"); - gst_omx_video_dec_drain (self); + gst_omx_video_dec_drain (decoder); gst_omx_video_dec_flush (decoder); gst_omx_port_set_flushing (out_port, 5 * GST_SECOND, TRUE); @@ -2436,21 +2437,20 @@ release_error: static GstFlowReturn gst_omx_video_dec_finish (GstVideoDecoder * decoder) { - GstOMXVideoDec *self; - - self = GST_OMX_VIDEO_DEC (decoder); - - return gst_omx_video_dec_drain (self); + return gst_omx_video_dec_drain (decoder); } static GstFlowReturn -gst_omx_video_dec_drain (GstOMXVideoDec * self) +gst_omx_video_dec_drain (GstVideoDecoder * decoder) { + GstOMXVideoDec *self; GstOMXVideoDecClass *klass; GstOMXBuffer *buf; GstOMXAcquireBufferReturn acq_ret; OMX_ERRORTYPE err; + self = GST_OMX_VIDEO_DEC (decoder); + GST_DEBUG_OBJECT (self, "Draining component"); klass = GST_OMX_VIDEO_DEC_GET_CLASS (self); |