aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-03-19 00:21:19 -0300
committerJames Almer <jamrial@gmail.com>2018-03-28 01:17:51 -0300
commita45ba0881c937e7b3c8000c9d06b031517dfe2ec (patch)
tree19caf0c1bc68feadd1377f28d5f52ff984503cb6
parentc289f4b6c9390d5b2b6388b0d82d40af62ea7ce2 (diff)
downloadffmpeg-a45ba0881c937e7b3c8000c9d06b031517dfe2ec.tar.gz
avcodec/mp3_header_decompress: don't free the user provided packet on error
It's owned by the caller. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit f18f9734694ea0761f94d57685f342b690d563b0)
-rw-r--r--libavcodec/mp3_header_decompress_bsf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mp3_header_decompress_bsf.c b/libavcodec/mp3_header_decompress_bsf.c
index 22c1ef0220..294858953c 100644
--- a/libavcodec/mp3_header_decompress_bsf.c
+++ b/libavcodec/mp3_header_decompress_bsf.c
@@ -87,7 +87,7 @@ static int mp3_header_decompress(AVBSFContext *ctx, AVPacket *out)
goto fail;
ret = av_packet_copy_props(out, in);
if (ret < 0) {
- av_packet_free(&out);
+ av_packet_unref(out);
goto fail;
}
memcpy(out->data + frame_size - buf_size, buf, buf_size + AV_INPUT_BUFFER_PADDING_SIZE);