[FFmpeg-cvslog] avcodec/mp3_header_decompress: don't free the user provided packet on error

James Almer git at videolan.org
Wed Mar 28 07:33:28 EEST 2018


ffmpeg | branch: release/3.4 | James Almer <jamrial at gmail.com> | Mon Mar 19 00:21:19 2018 -0300| [a45ba0881c937e7b3c8000c9d06b031517dfe2ec] | committer: James Almer

avcodec/mp3_header_decompress: don't free the user provided packet on error

It's owned by the caller.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit f18f9734694ea0761f94d57685f342b690d563b0)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a45ba0881c937e7b3c8000c9d06b031517dfe2ec
---

 libavcodec/mp3_header_decompress_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);



More information about the ffmpeg-cvslog mailing list