Commit 23ce57af authored by James Almer's avatar James Almer

Merge commit '69caad89'

* commit '69caad89':
  qsvdec: Release packet on decoding failure for  mpeg2/vp8/vc1
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 50ae1f7e 69caad89
...@@ -138,8 +138,13 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data, ...@@ -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); 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; return ret;
}
s->input_ref.size -= ret; s->input_ref.size -= ret;
s->input_ref.data += ret; s->input_ref.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