mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
avcodec/wrapped_avframe: Don't presume AVPacket to be writable
It need not be writable; in fact, it is often not writable even if the packet sent to the decoder was writable, because the generic code calls av_packet_ref() on it. It is never writable if a user drains the decoder after every packet, because in this case the decode callback is called from avcodec_send_packet(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
425b309fa4
commit
d72a671c60
@ -92,7 +92,9 @@ static int wrapped_avframe_decode(AVCodecContext *avctx, AVFrame *out,
|
||||
|
||||
in = (AVFrame*)pkt->data;
|
||||
|
||||
av_frame_move_ref(out, in);
|
||||
err = av_frame_ref(out, in);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = ff_decode_frame_props(avctx, out);
|
||||
if (err < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user