[Libav-user] av_interleaved_write_frame() memleak

Pavel Sokolov pavel at sokolov.me
Tue Sep 22 09:54:02 CEST 2015


May be it happens because I'm using interrupt callback to while exiting
from my task.

I have found the next code in libavformat/mux.c:

        if (ret <= 0) //FIXME cleanup needed for ret<0 ?
            return ret;

So, in my case ret = AVERROR_EXIT.

22.09.2015 10:47, Pavel Sokolov пишет:
> Hello.
>
> I'm using av_interleaved_write_frame() to write packet and valgrind
> told me about memleak.
>
> I'm opening conext with:
>
>     avformat_alloc_output_context2()
>     avio_open2()
>     ..
>     avformat_write_header()
>
>
> Closing with:
>
>     av_write_trailer()
>     avio_close()
>     avformat_free_context()
>
>
> ==21514== 68,787 (104 direct, 68,683 indirect) bytes in 1 blocks are
> definitely lost in loss record 6 of 6
> ==21514==    at 0x4C2D136: memalign (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==21514==    by 0x4C2D251: posix_memalign (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==21514==    by 0xC8CAAF: av_malloc (mem.c:97)
> ==21514==    by 0xC8CC7D: av_mallocz (mem.c:254)
> ==21514==    by 0x628659: ff_interleave_add_packet (mux.c:735)
> ==21514==    by 0x628AAA: ff_interleave_packet_per_dts (mux.c:841)
> ==21514==    by 0x62920C: interleave_packet (mux.c:929)
> ==21514==    by 0x62920C: av_interleaved_write_frame (mux.c:961)
>
>
>
>
> -- 
>
> With best regards, Pavel A. Sokolov
> mobile: +7(921)419-1819
> skype: pavel_a_sokolov
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

-- 

With best regards, Pavel A. Sokolov
mobile: +7(921)419-1819
skype: pavel_a_sokolov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150922/10531e95/attachment.html>


More information about the Libav-user mailing list