From daa0e18c751a0e5288fbdf0791c2f45ac1669029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 28 Feb 2017 15:11:42 +0200 Subject: [PATCH] videodecoder: Handle return value of gst_video_decoder_drain() CID 1362896 --- gst-libs/gst/video/gstvideodecoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 28a9f49307..5ff48eb1b2 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -2152,9 +2152,9 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder, * Also this function is only called for reverse playback to gather frames * GOP by GOP, and does not do any actual decoding. That would be done by * flush_decode() */ - if (was_keyframe && decoder->input_segment.rate > 0.0 + if (ret == GST_FLOW_OK && was_keyframe && decoder->input_segment.rate > 0.0 && (decoder->input_segment.flags & GST_SEEK_FLAG_TRICKMODE_KEY_UNITS)) - gst_video_decoder_drain_out (decoder, FALSE); + ret = gst_video_decoder_drain_out (decoder, FALSE); } else { gst_adapter_push (priv->input_adapter, buf);