[FFmpeg-cvslog] Merge commit '69caad8959982580504643d36aef22528e4aa6ce'

James Almer git at videolan.org
Tue Sep 11 19:43:26 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Sep 11 13:42:09 2018 -0300| [23ce57af3ad684363881cdd66d5724f40963a65c] | committer: James Almer

Merge commit '69caad8959982580504643d36aef22528e4aa6ce'

* commit '69caad8959982580504643d36aef22528e4aa6ce':
  qsvdec: Release packet on decoding failure for  mpeg2/vp8/vc1

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23ce57af3ad684363881cdd66d5724f40963a65c
---

 libavcodec/qsvdec_other.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c
index f6e08a2a84..993c7a8e80 100644
--- a/libavcodec/qsvdec_other.c
+++ b/libavcodec/qsvdec_other.c
@@ -138,8 +138,13 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data,
         }
 
         ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->input_ref);
-        if (ret < 0)
+        if (ret < 0) {
+            /* Drop input packet when failed to decode the packet. Otherwise,
+               the decoder will keep decoding the failure packet. */
+            av_packet_unref(&s->input_ref);
+
             return ret;
+        }
 
         s->input_ref.size -= ret;
         s->input_ref.data += ret;


======================================================================




More information about the ffmpeg-cvslog mailing list