diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-03-23 14:25:24 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-05-11 10:37:26 +0200 |
commit | 2cb86cd00c64ff16b16920eec37ec5b25a59b284 (patch) | |
tree | 5222a07973fdb141df12801a7b9d68850a6069ff /libavcodec/avcodec.c | |
parent | c954cf1e1b766a0d1992d5be0a8be0055a8e1a6a (diff) | |
download | ffmpeg-2cb86cd00c64ff16b16920eec37ec5b25a59b284.tar.gz |
lavc/avcodec: only allocate decoding packets for decoders
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r-- | libavcodec/avcodec.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 8afb6cd62e..9fc5e001f9 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -155,12 +155,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code avci->buffer_frame = av_frame_alloc(); avci->buffer_pkt = av_packet_alloc(); - avci->in_pkt = av_packet_alloc(); - avci->last_pkt_props = av_packet_alloc(); - avci->pkt_props = av_fifo_alloc2(1, sizeof(*avci->last_pkt_props), - AV_FIFO_FLAG_AUTO_GROW); - if (!avci->buffer_frame || !avci->buffer_pkt || - !avci->in_pkt || !avci->last_pkt_props || !avci->pkt_props) { + if (!avci->buffer_frame || !avci->buffer_pkt) { ret = AVERROR(ENOMEM); goto free_and_end; } |