[FFmpeg-cvslog] Merge commit '559370f2c45110afd8308eec7194437736c323d4'

Mark Thompson git at videolan.org
Fri Jan 26 00:51:30 EET 2018


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Thu Jan 25 22:50:38 2018 +0000| [04e4ab44d7c5eca9e1929b34d8fb966afc403e3a] | committer: Mark Thompson

Merge commit '559370f2c45110afd8308eec7194437736c323d4'

* commit '559370f2c45110afd8308eec7194437736c323d4':
  qsv: Skip the packet if decoding failure

Merged-by: Mark Thompson <sw at jkqxz.net>

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

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

diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index 5e0067335e..831252f2d7 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -153,8 +153,12 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data,
         }
 
         ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
-        if (ret < 0)
+        if (ret < 0){
+            /* Drop buffer_pkt when failed to decode the packet. Otherwise,
+               the decoder will keep decoding the failure packet. */
+            av_packet_unref(&s->buffer_pkt);
             return ret;
+        }
 
         s->buffer_pkt.size -= ret;
         s->buffer_pkt.data += ret;


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




More information about the ffmpeg-cvslog mailing list