Commit 04e4ab44 authored by Mark Thompson's avatar Mark Thompson

Merge commit '559370f2'

* commit '559370f2':
  qsv: Skip the packet if decoding failure
Merged-by: 's avatarMark Thompson <sw@jkqxz.net>
parents b855b570 559370f2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment