[FFmpeg-devel] [PATCH] fix tests/seek_test memleaks

Vitor Sessak vitor1001
Sat Feb 27 15:55:42 CET 2010


Reimar D?ffinger wrote:
> Hello,
> seems there's a incorrect av_dup_packet in utils.c?
> At least I am unable to see why it is there, and I sure can't see a corresponding
> free...
> Also is the documentation on av_open_input_file clear enough that you shouldn't
> alloc the context first?

> 
> Index: libavformat/utils.c
> ===================================================================
> --- libavformat/utils.c	(revision 22083)
> +++ libavformat/utils.c	(working copy)
> @@ -2169,10 +2169,6 @@
>          }
>  
>          pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end);
> -        if(av_dup_packet(pkt) < 0) {
> -            av_free(duration_error);
> -            return AVERROR(ENOMEM);
> -        }

This hunk seems to break "make test":

TEST VCODEC asv1
TEST VCODEC asv2
TEST VCODEC dnxhd_1080i
TEST VCODEC dnxhd_720p
--- /home/vitor/ffmpeg/tests/ref/vsynth1/dnxhd_720p	2010-02-19 
21:59:03.000000000 +0100
+++ tests/data/dnxhd_720p.vsynth1.regression	2010-02-27 
15:50:56.000000000 +0100
@@ -1,4 +1,4 @@
  81f5be451dc18cf8a1d333c7885de60b *./tests/data/a-dnxhd-720p.dnxhd
  2293760 ./tests/data/a-dnxhd-720p.dnxhd
-94b21e5e68ccf9471eff74afd0ebe319 *./tests/data/dnxhd_720p.vsynth1.out.yuv
-stddev:    6.32 PSNR: 32.11 bytes:   760320/  7603200
+4b70405909b1819403ff15d340bd0ca2 *./tests/data/dnxhd_720p.vsynth1.out.yuv
+stddev:   56.95 PSNR: 13.02 bytes:   760320/  7603200

-Vitor



More information about the ffmpeg-devel mailing list