mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
avviddec: Don't return GST_FLOW_EOS from drain()/finish()
AVERROR_EOF means that it's fully drained, but it doesn't mean that that end of stream. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/90>
This commit is contained in:
parent
7388b14423
commit
72933810f5
1 changed files with 8 additions and 0 deletions
|
@ -1824,6 +1824,14 @@ gst_ffmpegviddec_drain (GstVideoDecoder * decoder)
|
|||
} while (got_frame && ret == GST_FLOW_OK);
|
||||
avcodec_flush_buffers (ffmpegdec->context);
|
||||
|
||||
/* FFMpeg will return AVERROR_EOF if it's internal was fully drained
|
||||
* then we are translating it to GST_FLOW_EOS. However, because this behavior
|
||||
* is fullly internal stuff of this implementation and gstvideodecoer
|
||||
* baseclass doesn't convert this GST_FLOW_EOS to GST_FLOW_OK,
|
||||
* convert this flow retturn by ourselves */
|
||||
if (ret == GST_FLOW_EOS)
|
||||
ret = GST_FLOW_OK;
|
||||
|
||||
done:
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue