1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Merge commit '559370f2c45110afd8308eec7194437736c323d4'

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

Merged-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
Mark Thompson 2018-01-25 22:50:38 +00:00
commit 04e4ab44d7

View File

@ -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;