Memory leak is in MPEG TS parser, in the part, parsing the PSI. I've managed to run the program under valgrind, and got failing call stacks. I fed AVI files and MPEG TS to my program. The latter was sourced both from a file and from a live stream. I can upload my test files, but I would like to receive an approval to do this from someone of FFmpeg team. One file is about 3GB, and another one is ~60Mb. No memory leaks with AVI files. Memory is leaking in MPEG TS. My impression from the first quick analysis, that the parser-demuxer doesn't drop previous PSI records, when a new PSI portion (PAT, PMT, SDT or else) comes. FFmpeg revision 12935. I have also increased MAX_STREAMS in avformat.h from 20 to 60. configure switches: ./configure --disable-optimizations --disable-mmx --disable-ssse3 --disable-mmx2 --enable-shared --disable-static --disable-stripping --cpu=i686 --enable-debug=3 --enable-pthreads My program compilation command: $ gcc -o mf_read mf_read.c -O0 -g3 -lavcodec -lavformat -lavutil -lm -lpthread -lz valgrind v 3.3.0 command: $ valgrind --leak-check=full --show-reachable=yes ./mf_read Test program source. ==================== #include #include #include #include "libavcodec/avcodec.h" #include "libavutil/avutil.h" #include "libavformat/avformat.h" #ifdef MEMWATCH #include "memwatch.h" #endif #ifdef __GNUC__ #include int kbhit(void) {struct timeval tv; fd_set read_fd; tv.tv_sec=0; tv.tv_usec=0; FD_ZERO(&read_fd); FD_SET(0,&read_fd); if(select(1, &read_fd, NULL, NULL, &tv) == -1) return 0; if(FD_ISSET(0,&read_fd)) return 1; return 0; } #endif int main(void) {AVFormatContext *input=NULL; AVFormatParameters ap; AVPacket pkt; int bqsize=0,r; unsigned long pread=0; #ifdef _MSC_VER fputs("press enter to start",stderr); fgetc(stdin); #endif #ifdef MEMWATCH mwInit(); #endif av_register_all(); av_log_level=AV_LOG_DEBUG; input=av_alloc_format_context(); input->iformat=av_find_input_format("mpegts"); //input->iformat=av_find_input_format("avi"); printf("input format: %s (%p)\n",input->iformat->name,input->iformat); input->flags|=AVFMT_FLAG_IGNIDX; input->max_index_size=1024*50; input->max_picture_buffer=1024*100; memset(&ap, 0, sizeof(ap)); ap.prealloced_context=1; //r=av_open_input_file(&input,"Supermonahi_www.moblex.ru.avi",input->iformat,0,&ap); //r=av_open_input_file(&input,"88.avi",input->iformat,0,&ap); r=av_open_input_file(&input,"dump02.ts",input->iformat,0,&ap); //r=av_open_input_file(&input,"/dev/asirx0",input->iformat,0,&ap); printf("av_open_input_stream (%s), ret=%d\n",input->filename,r); r=av_find_stream_info(input); printf("av_find_stream_info, ret=%d\n",r); input->pb->is_streamed=1; r=0; av_init_packet(&pkt); while(r==0 && !kbhit()){ r = av_read_frame(input,&pkt); pread++; if(!(pread%1000)) printf("packets read: %lu \r",pread); av_free_packet(&pkt); } puts("\nfinished"); av_close_input_file(input); #ifdef MEMWATCH mwTerm(); #endif return 0; } Run results =========== Several runs on 10Mb sample (issue430_wl2776_dump.ts): ====================================================== [root@DVB dvb_capture_minimal]# valgrind --leak-check=full --show-reachable=yes ./mf_read ==10379== Memcheck, a memory error detector. ==10379== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==10379== Using LibVEX rev 1804, a library for dynamic binary translation. ==10379== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==10379== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==10379== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==10379== For more details, rerun with: -v ==10379== input format: mpegts (0x45744a0) av_open_input_stream (issue430_wl2776_dump.ts), ret=0 av_find_stream_info, ret=3311 packets read: 4000 finished ==10379== ==10379== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 22 from 1) ==10379== malloc/free: in use at exit: 227,122 bytes in 746 blocks. ==10379== malloc/free: 77,405 allocs, 76,659 frees, 49,152,871 bytes allocated. ==10379== For counts of detected errors, rerun with: -v ==10379== searching for pointers to 746 not-freed blocks. ==10379== checked 1,168,952 bytes. ==10379== ==10379== 7,450 bytes in 740 blocks are definitely lost in loss record 1 of 2 ==10379== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10379== by 0x457BE42: av_malloc (mem.c:61) ==10379== by 0x452F591: getstr8 (mpegts.c:434) ==10379== by 0x4530068: sdt_cb (mpegts.c:764) ==10379== by 0x452F1BC: write_section_data (mpegts.c:271) ==10379== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10379== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10379== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10379== by 0x44E6F32: av_read_packet (utils.c:501) ==10379== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10379== by 0x44EB101: av_find_stream_info (utils.c:1897) ==10379== by 0x8048969: main (mf_read.c:67) ==10379== ==10379== ==10379== 219,672 bytes in 6 blocks are definitely lost in loss record 2 of 2 ==10379== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10379== by 0x457BE7A: av_realloc (mem.c:110) ==10379== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==10379== by 0x44EC0C0: av_new_program (utils.c:2212) ==10379== by 0x452FDEE: pat_cb (mpegts.c:686) ==10379== by 0x452F1BC: write_section_data (mpegts.c:271) ==10379== by 0x4530A78: handle_packet (mpegts.c:1070) ==10379== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10379== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==10379== by 0x44E6BED: av_open_input_stream (utils.c:395) ==10379== by 0x44E6EBE: av_open_input_file (utils.c:481) ==10379== by 0x8048936: main (mf_read.c:64) ==10379== ==10379== LEAK SUMMARY: ==10379== definitely lost: 227,122 bytes in 746 blocks. ==10379== possibly lost: 0 bytes in 0 blocks. ==10379== still reachable: 0 bytes in 0 blocks. ==10379== suppressed: 0 bytes in 0 blocks. ==10394== Memcheck, a memory error detector. ==10394== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==10394== Using LibVEX rev 1804, a library for dynamic binary translation. ==10394== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==10394== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==10394== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==10394== For more details, rerun with: -v ==10394== input format: mpegts (0x45744a0) av_open_input_stream (issue430_wl2776_dump.ts), ret=0 av_find_stream_info, ret=3311 packets read: 4000 finished ==10394== ==10394== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 22 from 1) ==10394== malloc/free: in use at exit: 227,122 bytes in 746 blocks. ==10394== malloc/free: 77,405 allocs, 76,659 frees, 49,152,885 bytes allocated. ==10394== For counts of detected errors, rerun with: -v ==10394== searching for pointers to 746 not-freed blocks. ==10394== checked 1,168,952 bytes. ==10394== ==10394== 7,450 bytes in 740 blocks are definitely lost in loss record 1 of 3 ==10394== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10394== by 0x457BE42: av_malloc (mem.c:61) ==10394== by 0x452F591: getstr8 (mpegts.c:434) ==10394== by 0x453004B: sdt_cb (mpegts.c:761) ==10394== by 0x452F1BC: write_section_data (mpegts.c:271) ==10394== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10394== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10394== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10394== by 0x44E6F32: av_read_packet (utils.c:501) ==10394== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10394== by 0x44E860A: av_read_frame (utils.c:953) ==10394== by 0x80489D5: main (mf_read.c:75) ==10394== ==10394== ==10394== 17,543 bytes in 1 blocks are indirectly lost in loss record 2 of 3 ==10394== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10394== by 0x457BE7A: av_realloc (mem.c:110) ==10394== by 0x407D890: av_fast_realloc (utils.c:69) ==10394== by 0x407AC13: ff_combine_frame (parser.c:252) ==10394== by 0x43338DD: ff_aac_ac3_parse (aac_ac3_parser.c:62) ==10394== by 0x407A897: av_parser_parse (parser.c:136) ==10394== by 0x44E7EFB: av_read_frame_internal (utils.c:798) ==10394== by 0x44E860A: av_read_frame (utils.c:953) ==10394== by 0x80489D5: main (mf_read.c:75) ==10394== ==10394== ==10394== 219,672 (202,129 direct, 17,543 indirect) bytes in 5 blocks are definitely lost in loss record 3 of 3 ==10394== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10394== by 0x457BE7A: av_realloc (mem.c:110) ==10394== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==10394== by 0x44EC0C0: av_new_program (utils.c:2212) ==10394== by 0x452FDEE: pat_cb (mpegts.c:686) ==10394== by 0x452F1BC: write_section_data (mpegts.c:271) ==10394== by 0x4530A78: handle_packet (mpegts.c:1070) ==10394== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10394== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==10394== by 0x44E6BED: av_open_input_stream (utils.c:395) ==10394== by 0x44E6EBE: av_open_input_file (utils.c:481) ==10394== by 0x8048936: main (mf_read.c:65) ==10394== ==10394== LEAK SUMMARY: ==10394== definitely lost: 209,579 bytes in 745 blocks. ==10394== indirectly lost: 17,543 bytes in 1 blocks. ==10394== possibly lost: 0 bytes in 0 blocks. ==10394== still reachable: 0 bytes in 0 blocks. ==10394== suppressed: 0 bytes in 0 blocks. Runs on live stream from a dvb device: ============================== gcc -o mf_read mf_read.c -O0 -g3 -lavcodec -lavformat -lavutil -lm -lpthread -lz [root@DVB dvb_capture_minimal]# valgrind --leak-check=full --show-reachable=yes ./mf_read ==9533== Memcheck, a memory error detector. ==9533== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==9533== Using LibVEX rev 1804, a library for dynamic binary translation. ==9533== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==9533== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==9533== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==9533== For more details, rerun with: -v ==9533== input format: mpegts (0x45744a0) av_open_input_stream, ret=0 ==9533== Invalid read of size 4 ==9533== at 0x4263C8E: get_bits (bitstream.h:658) ==9533== by 0x4264411: mp_decode_layer2 (mpegaudiodec.c:1322) ==9533== by 0x4267FD3: mp_decode_frame (mpegaudiodec.c:2309) ==9533== by 0x42684B4: decode_frame (mpegaudiodec.c:2410) ==9533== by 0x407EB78: avcodec_decode_audio2 (utils.c:976) ==9533== by 0x44EAA34: try_decode_frame (utils.c:1723) ==9533== by 0x44EB65D: av_find_stream_info (utils.c:1986) ==9533== by 0x8048960: main (mf_read.c:68) ==9533== Address 0x4b8ed65 is 293 bytes inside a block of size 296 alloc'd ==9533== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==9533== by 0x457BE42: av_malloc (mem.c:61) ==9533== by 0x44E686B: av_dup_packet (utils.c:247) ==9533== by 0x44EB1CA: av_find_stream_info (utils.c:1915) ==9533== by 0x8048960: main (mf_read.c:68) ==9533== ==9533== Invalid read of size 4 ==9533== at 0x4263C8E: get_bits (bitstream.h:658) ==9533== by 0x4264237: mp_decode_layer2 (mpegaudiodec.c:1310) ==9533== by 0x4267FD3: mp_decode_frame (mpegaudiodec.c:2309) ==9533== by 0x42684B4: decode_frame (mpegaudiodec.c:2410) ==9533== by 0x407EB78: avcodec_decode_audio2 (utils.c:976) ==9533== by 0x44EAA34: try_decode_frame (utils.c:1723) ==9533== by 0x44EB65D: av_find_stream_info (utils.c:1986) ==9533== by 0x8048960: main (mf_read.c:68) ==9533== Address 0x4b8ed65 is 293 bytes inside a block of size 296 alloc'd ==9533== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==9533== by 0x457BE42: av_malloc (mem.c:61) ==9533== by 0x44E686B: av_dup_packet (utils.c:247) ==9533== by 0x44EB1CA: av_find_stream_info (utils.c:1915) ==9533== by 0x8048960: main (mf_read.c:68) [mpeg2video @ 0x4341940]ac-tex damaged at 16 7 [mpeg2video @ 0x4341940]ac-tex damaged at 1 13 [mpeg2video @ 0x4341940]ac-tex damaged at 0 14 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 15 [mpeg2video @ 0x4341940]ac-tex damaged at 0 16 [mpeg2video @ 0x4341940]ac-tex damaged at 0 17 [mpeg2video @ 0x4341940]ac-tex damaged at 0 18 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 19 [mpeg2video @ 0x4341940]ac-tex damaged at 0 20 [mpeg2video @ 0x4341940]ac-tex damaged at 0 21 [mpeg2video @ 0x4341940]ac-tex damaged at 0 22 [mpeg2video @ 0x4341940]ac-tex damaged at 0 23 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 24 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 25 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]ac-tex damaged at 0 29 [mpeg2video @ 0x4341940]ac-tex damaged at 0 30 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 31 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 32 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 986 DC, 986 AC, 986 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 2 22 [mpeg2video @ 0x4341940]ac-tex damaged at 0 17 [mpeg2video @ 0x4341940]ac-tex damaged at 1 18 [mpeg2video @ 0x4341940]ac-tex damaged at 1 19 [mpeg2video @ 0x4341940]ac-tex damaged at 0 20 [mpeg2video @ 0x4341940]ac-tex damaged at 0 21 [mpeg2video @ 0x4341940]ac-tex damaged at 0 22 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 23 [mpeg2video @ 0x4341940]ac-tex damaged at 0 24 [mpeg2video @ 0x4341940]ac-tex damaged at 0 25 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]ac-tex damaged at 0 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]ac-tex damaged at 0 29 [mpeg2video @ 0x4341940]ac-tex damaged at 0 30 [mpeg2video @ 0x4341940]ac-tex damaged at 0 31 [mpeg2video @ 0x4341940]ac-tex damaged at 0 32 [mpeg2video @ 0x4341940]ac-tex damaged at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 1 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 855 DC, 855 AC, 855 MV errors [mpeg2video @ 0x4341940]skipped MB in I frame at 36 28 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 0 DC, 0 AC, 0 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 22 7 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 23 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 24 [mpeg2video @ 0x4341940]ac-tex damaged at 0 25 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]ac-tex damaged at 0 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]ac-tex damaged at 0 29 [mpeg2video @ 0x4341940]ac-tex damaged at 0 30 [mpeg2video @ 0x4341940]ac-tex damaged at 0 31 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 32 [mpeg2video @ 0x4341940]ac-tex damaged at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1305 DC, 1305 AC, 1305 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 37 13 [mpeg2video @ 0x4341940]ac-tex damaged at 0 11 [mpeg2video @ 0x4341940]ac-tex damaged at 0 12 [mpeg2video @ 0x4341940]ac-tex damaged at 0 13 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 14 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 15 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 16 [mpeg2video @ 0x4341940]ac-tex damaged at 0 17 [mpeg2video @ 0x4341940]ac-tex damaged at 0 18 [mpeg2video @ 0x4341940]ac-tex damaged at 0 19 [mpeg2video @ 0x4341940]ac-tex damaged at 0 20 [mpeg2video @ 0x4341940]ac-tex damaged at 0 21 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 22 [mpeg2video @ 0x4341940]ac-tex damaged at 0 23 [mpeg2video @ 0x4341940]ac-tex damaged at 0 24 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 25 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 29 [mpeg2video @ 0x4341940]ac-tex damaged at 0 30 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 31 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 32 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 1 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1125 DC, 1125 AC, 1125 MV errors av_find_stream_info, ret=2314 packets read: 41000 packets read: 62000 finished ==9533== ==9533== ERROR SUMMARY: 113 errors from 2 contexts (suppressed: 22 from 1) ==9533== malloc/free: in use at exit: 2,363,197 bytes in 5,924 blocks. ==9533== malloc/free: 650,715 allocs, 644,791 frees, 187,823,544 bytes allocated. ==9533== For counts of detected errors, rerun with: -v ==9533== searching for pointers to 5,924 not-freed blocks. ==9533== checked 1,168,952 bytes. ==9533== ==9533== ==9533== 44 bytes in 4 blocks are indirectly lost in loss record 1 of 4 ==9533== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==9533== by 0x457BE42: av_malloc (mem.c:61) ==9533== by 0x452F591: getstr8 (mpegts.c:434) ==9533== by 0x453004B: sdt_cb (mpegts.c:761) ==9533== by 0x452F1BC: write_section_data (mpegts.c:271) ==9533== by 0x4530AAD: handle_packet (mpegts.c:1075) ==9533== by 0x4530CA7: handle_packets (mpegts.c:1149) ==9533== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==9533== by 0x44E6F32: av_read_packet (utils.c:501) ==9533== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==9533== by 0x44E860A: av_read_frame (utils.c:953) ==9533== by 0x80489CC: main (mf_read.c:75) ==9533== ==9533== ==9533== 59,556 bytes in 5,916 blocks are definitely lost in loss record 2 of 4 ==9533== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==9533== by 0x457BE42: av_malloc (mem.c:61) ==9533== by 0x452F591: getstr8 (mpegts.c:434) ==9533== by 0x453004B: sdt_cb (mpegts.c:761) ==9533== by 0x452F1BC: write_section_data (mpegts.c:271) ==9533== by 0x4530AAD: handle_packet (mpegts.c:1075) ==9533== by 0x4530CA7: handle_packets (mpegts.c:1149) ==9533== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==9533== by 0x44E6F32: av_read_packet (utils.c:501) ==9533== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==9533== by 0x44E860A: av_read_frame (utils.c:953) ==9533== by 0x80489CC: main (mf_read.c:75) ==9533== ==9533== ==9533== 354,648 bytes in 1 blocks are indirectly lost in loss record 3 of 4 ==9533== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==9533== by 0x457BE7A: av_realloc (mem.c:110) ==9533== by 0x407D890: av_fast_realloc (utils.c:69) ==9533== by 0x407AC13: ff_combine_frame (parser.c:252) ==9533== by 0x43338DD: ff_aac_ac3_parse (aac_ac3_parser.c:62) ==9533== by 0x407A897: av_parser_parse (parser.c:136) ==9533== by 0x44E7EFB: av_read_frame_internal (utils.c:798) ==9533== by 0x44E860A: av_read_frame (utils.c:953) ==9533== by 0x80489CC: main (mf_read.c:75) ==9533== ==9533== ==9533== 2,303,641 (1,948,949 direct, 354,692 indirect) bytes in 3 blocks are definitely lost in loss record 4 of 4 ==9533== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==9533== by 0x457BE7A: av_realloc (mem.c:110) ==9533== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==9533== by 0x44EC0C0: av_new_program (utils.c:2212) ==9533== by 0x452FDEE: pat_cb (mpegts.c:686) ==9533== by 0x452F1BC: write_section_data (mpegts.c:271) ==9533== by 0x4530A78: handle_packet (mpegts.c:1070) ==9533== by 0x4530CA7: handle_packets (mpegts.c:1149) ==9533== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==9533== by 0x44E6BED: av_open_input_stream (utils.c:395) ==9533== by 0x44E6EBE: av_open_input_file (utils.c:481) ==9533== by 0x8048936: main (mf_read.c:66) ==9533== ==9533== LEAK SUMMARY: ==9533== definitely lost: 2,008,505 bytes in 5,919 blocks. ==9533== indirectly lost: 354,692 bytes in 5 blocks. ==9533== possibly lost: 0 bytes in 0 blocks. ==9533== still reachable: 0 bytes in 0 blocks. ==9533== suppressed: 0 bytes in 0 blocks. [root@DVB dvb_capture_minimal]# valgrind --leak-check=full --show-reachable=yes ./mf_read ==10056== Memcheck, a memory error detector. ==10056== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==10056== Using LibVEX rev 1804, a library for dynamic binary translation. ==10056== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==10056== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==10056== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==10056== For more details, rerun with: -v ==10056== input format: mpegts (0x45744a0) av_open_input_stream (/dev/asirx0), ret=0 ==10056== Invalid read of size 4 ==10056== at 0x4263C8E: get_bits (bitstream.h:658) ==10056== by 0x4264411: mp_decode_layer2 (mpegaudiodec.c:1322) ==10056== by 0x4267FD3: mp_decode_frame (mpegaudiodec.c:2309) ==10056== by 0x42684B4: decode_frame (mpegaudiodec.c:2410) ==10056== by 0x407EB78: avcodec_decode_audio2 (utils.c:976) ==10056== by 0x44EAA34: try_decode_frame (utils.c:1723) ==10056== by 0x44EB65D: av_find_stream_info (utils.c:1986) ==10056== by 0x8048969: main (mf_read.c:66) ==10056== Address 0x4c39875 is 293 bytes inside a block of size 296 alloc'd ==10056== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10056== by 0x457BE42: av_malloc (mem.c:61) ==10056== by 0x44E686B: av_dup_packet (utils.c:247) ==10056== by 0x44EB1CA: av_find_stream_info (utils.c:1915) ==10056== by 0x8048969: main (mf_read.c:66) ==10056== ==10056== Invalid read of size 4 ==10056== at 0x4263C8E: get_bits (bitstream.h:658) ==10056== by 0x4264237: mp_decode_layer2 (mpegaudiodec.c:1310) ==10056== by 0x4267FD3: mp_decode_frame (mpegaudiodec.c:2309) ==10056== by 0x42684B4: decode_frame (mpegaudiodec.c:2410) ==10056== by 0x407EB78: avcodec_decode_audio2 (utils.c:976) ==10056== by 0x44EAA34: try_decode_frame (utils.c:1723) ==10056== by 0x44EB65D: av_find_stream_info (utils.c:1986) ==10056== by 0x8048969: main (mf_read.c:66) ==10056== Address 0x4c39875 is 293 bytes inside a block of size 296 alloc'd ==10056== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10056== by 0x457BE42: av_malloc (mem.c:61) ==10056== by 0x44E686B: av_dup_packet (utils.c:247) ==10056== by 0x44EB1CA: av_find_stream_info (utils.c:1915) ==10056== by 0x8048969: main (mf_read.c:66) [mpeg2video @ 0x4341940]ac-tex damaged at 28 7 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 27 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 28 [mpeg2video @ 0x4341940]ac-tex damaged at 0 29 [mpeg2video @ 0x4341940]ac-tex damaged at 0 30 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 31 [mpeg2video @ 0x4341940]ac-tex damaged at 0 32 [mpeg2video @ 0x4341940]ac-tex damaged at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1305 DC, 1305 AC, 1305 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 6 12 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 31 7 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 26 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 27 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 28 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 29 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 30 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 31 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 32 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 1 34 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 35 [mpeg2video @ 0x430bc60]ac-tex damaged at 0 33 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1125 DC, 1125 AC, 1125 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 11 1 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1190 DC, 1190 AC, 1190 MV errors packets read: 122000 ==15867== ==15867== Process terminating with default action of signal 8 (SIGFPE) ==15867== Integer divide by zero at address 0x62C5CCA5 [mpeg2video @ 0x4341940]ac-tex damaged at 31 15 [mpeg2video @ 0x4341940]ac-tex damaged at 0 18 ==15867== ERROR SUMMARY: 181 errors from 2 contexts (suppressed: 22 from 1) ==15867== malloc/free: in use at exit: 4,909,133 bytes in 10,959 blocks. ==15867== malloc/free: 1,226,688 allocs, 1,215,729 frees, 322,576,606 bytes allocated. ==15867== For counts of detected errors, rerun with: -v [mpeg2video @ 0x4341940]ac-tex damaged at 0 19 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 20 [mpeg2video @ 0x4341940]ac-tex damaged at 0 21 [mpeg2video @ 0x4341940]ac-tex damaged at 0 22 [mpeg2video @ 0x4341940]ac-tex damaged at 0 23 [mpeg2video @ 0x4341940]ac-tex damaged at 0 24 [mpeg2video @ 0x4341940]ac-tex damaged at 0 25 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 26 [mpeg2video @ 0x4341940]ac-tex damaged at 0 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 29 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 30 [mpeg2video @ 0x4341940]ac-tex damaged at 0 31 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 32 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 945 DC, 945 AC, 945 MV errors [mpeg2video @ 0x4341940]ac-tex damaged at 5 10 [mpeg2video @ 0x4341940]ac-tex damaged at 0 25 [mpeg2video @ 0x4341940]ac-tex damaged at 0 26 [mpeg2video @ 0x4341940]ac-tex damaged at 0 27 [mpeg2video @ 0x4341940]ac-tex damaged at 0 28 [mpeg2video @ 0x4341940]ac-tex damaged at 0 29 [mpeg2video @ 0x4341940]invalid mb type in I Frame at 0 30 [mpeg2video @ 0x4341940]skipped MB in I frame at 1 31 [mpeg2video @ 0x4341940]ac-tex damaged at 1 32 [mpeg2video @ 0x4341940]ac-tex damaged at 0 33 [mpeg2video @ 0x4341940]ac-tex damaged at 0 34 [mpeg2video @ 0x4341940]ac-tex damaged at 0 35 [mpeg2video @ 0x4341940]Warning MVs not available [mpeg2video @ 0x4341940]concealing 1170 DC, 1170 AC, 1170 MV errors av_find_stream_info, ret=2374 packets read: 82000 packets read: 92000 finished ==10056== ==10056== ERROR SUMMARY: 116 errors from 2 contexts (suppressed: 22 from 1) ==10056== malloc/free: in use at exit: 3,512,334 bytes in 8,884 blocks. ==10056== malloc/free: 953,956 allocs, 945,072 frees, 263,372,506 bytes allocated. ==10056== For counts of detected errors, rerun with: -v ==10056== searching for pointers to 8,884 not-freed blocks. ==10056== checked 3,905,496 bytes. ==10056== ==10056== ==10056== 18 bytes in 1 blocks are indirectly lost in loss record 1 of 5 ==10056== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10056== by 0x457BE42: av_malloc (mem.c:61) ==10056== by 0x452F591: getstr8 (mpegts.c:434) ==10056== by 0x4530068: sdt_cb (mpegts.c:764) ==10056== by 0x452F1BC: write_section_data (mpegts.c:271) ==10056== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10056== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10056== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10056== by 0x44E6F32: av_read_packet (utils.c:501) ==10056== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10056== by 0x44E860A: av_read_frame (utils.c:953) ==10056== by 0x80489D5: main (mf_read.c:73) ==10056== ==10056== ==10056== 65 bytes in 6 blocks are possibly lost in loss record 2 of 5 ==10056== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10056== by 0x457BE42: av_malloc (mem.c:61) ==10056== by 0x452F591: getstr8 (mpegts.c:434) ==10056== by 0x4530068: sdt_cb (mpegts.c:764) ==10056== by 0x452F1BC: write_section_data (mpegts.c:271) ==10056== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10056== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10056== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10056== by 0x44E6F32: av_read_packet (utils.c:501) ==10056== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10056== by 0x44E860A: av_read_frame (utils.c:953) ==10056== by 0x80489D5: main (mf_read.c:73) ==10056== ==10056== ==10056== 89,317 bytes in 8,873 blocks are definitely lost in loss record 3 of 5 ==10056== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10056== by 0x457BE42: av_malloc (mem.c:61) ==10056== by 0x452F591: getstr8 (mpegts.c:434) ==10056== by 0x4530068: sdt_cb (mpegts.c:764) ==10056== by 0x452F1BC: write_section_data (mpegts.c:271) ==10056== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10056== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10056== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10056== by 0x44E6F32: av_read_packet (utils.c:501) ==10056== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10056== by 0x44E860A: av_read_frame (utils.c:953) ==10056== by 0x80489D5: main (mf_read.c:73) ==10056== ==10056== ==10056== 540,985 (540,967 direct, 18 indirect) bytes in 3 blocks are definitely lost in loss record 4 of 5 ==10056== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10056== by 0x457BE7A: av_realloc (mem.c:110) ==10056== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==10056== by 0x44EC0C0: av_new_program (utils.c:2212) ==10056== by 0x452FDEE: pat_cb (mpegts.c:686) ==10056== by 0x452F1BC: write_section_data (mpegts.c:271) ==10056== by 0x4530A78: handle_packet (mpegts.c:1070) ==10056== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10056== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==10056== by 0x44E6BED: av_open_input_stream (utils.c:395) ==10056== by 0x44E6EBE: av_open_input_file (utils.c:481) ==10056== by 0x8048936: main (mf_read.c:64) ==10056== ==10056== ==10056== 2,881,967 bytes in 1 blocks are possibly lost in loss record 5 of 5 ==10056== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10056== by 0x457BE7A: av_realloc (mem.c:110) ==10056== by 0x407D890: av_fast_realloc (utils.c:69) ==10056== by 0x407AC13: ff_combine_frame (parser.c:252) ==10056== by 0x43338DD: ff_aac_ac3_parse (aac_ac3_parser.c:62) ==10056== by 0x407A897: av_parser_parse (parser.c:136) ==10056== by 0x44E7EFB: av_read_frame_internal (utils.c:798) ==10056== by 0x44E860A: av_read_frame (utils.c:953) ==10056== by 0x80489D5: main (mf_read.c:73) ==10056== ==10056== LEAK SUMMARY: ==10056== definitely lost: 630,284 bytes in 8,876 blocks. ==10056== indirectly lost: 18 bytes in 1 blocks. ==10056== possibly lost: 2,882,032 bytes in 7 blocks. ==10056== still reachable: 0 bytes in 0 blocks. ==10056== suppressed: 0 bytes in 0 blocks. Runs on other stream dumps from files (dump01.ts) =================================== [root@DVB dvb_capture_minimal]# valgrind --leak-check=full --show-reachable=yes ./mf_read ==10199== Memcheck, a memory error detector. ==10199== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==10199== Using LibVEX rev 1804, a library for dynamic binary translation. ==10199== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==10199== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==10199== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==10199== For more details, rerun with: -v ==10199== input format: mpegts (0x45744a0) av_open_input_stream (dump01.ts), ret=0 av_find_stream_info, ret=3302 packets read: 1493000 finished ==10199== ==10199== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 22 from 1) ==10199== malloc/free: in use at exit: 40,574,769 bytes in 102,866 blocks. ==10199== malloc/free: 12,863,965 allocs, 12,761,099 frees, 3,109,988,751 bytes allocated. ==10199== For counts of detected errors, rerun with: -v ==10199== searching for pointers to 102,866 not-freed blocks. ==10199== checked 39,406,892 bytes. ==10199== ==10199== 35 bytes in 4 blocks are still reachable in loss record 1 of 5 ==10199== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10199== by 0x457BE42: av_malloc (mem.c:61) ==10199== by 0x452F591: getstr8 (mpegts.c:434) ==10199== by 0x4530068: sdt_cb (mpegts.c:764) ==10199== by 0x452F1BC: write_section_data (mpegts.c:271) ==10199== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10199== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10199== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10199== by 0x44E6F32: av_read_packet (utils.c:501) ==10199== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10199== by 0x44E860A: av_read_frame (utils.c:953) ==10199== by 0x80489D5: main (mf_read.c:74) ==10199== ==10199== ==10199== 1,131 bytes in 103 blocks are possibly lost in loss record 2 of 5 ==10199== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10199== by 0x457BE42: av_malloc (mem.c:61) ==10199== by 0x452F591: getstr8 (mpegts.c:434) ==10199== by 0x4530068: sdt_cb (mpegts.c:764) ==10199== by 0x452F1BC: write_section_data (mpegts.c:271) ==10199== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10199== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10199== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10199== by 0x44E6F32: av_read_packet (utils.c:501) ==10199== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10199== by 0x44E860A: av_read_frame (utils.c:953) ==10199== by 0x80489D5: main (mf_read.c:74) ==10199== ==10199== ==10199== 104,276 bytes in 4 blocks are definitely lost in loss record 3 of 5 ==10199== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10199== by 0x457BE7A: av_realloc (mem.c:110) ==10199== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==10199== by 0x44EC0C0: av_new_program (utils.c:2212) ==10199== by 0x452FDEE: pat_cb (mpegts.c:686) ==10199== by 0x452F1BC: write_section_data (mpegts.c:271) ==10199== by 0x4530A78: handle_packet (mpegts.c:1070) ==10199== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10199== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==10199== by 0x44E6BED: av_open_input_stream (utils.c:395) ==10199== by 0x44E6EBE: av_open_input_file (utils.c:481) ==10199== by 0x8048936: main (mf_read.c:64) ==10199== ==10199== ==10199== 1,027,434 bytes in 102,753 blocks are definitely lost in loss record 4 of 5 ==10199== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10199== by 0x457BE42: av_malloc (mem.c:61) ==10199== by 0x452F591: getstr8 (mpegts.c:434) ==10199== by 0x453004B: sdt_cb (mpegts.c:761) ==10199== by 0x452F1BC: write_section_data (mpegts.c:271) ==10199== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10199== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10199== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10199== by 0x44E6F32: av_read_packet (utils.c:501) ==10199== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10199== by 0x44E860A: av_read_frame (utils.c:953) ==10199== by 0x80489D5: main (mf_read.c:74) ==10199== ==10199== ==10199== 39,441,893 bytes in 2 blocks are possibly lost in loss record 5 of 5 ==10199== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10199== by 0x457BE7A: av_realloc (mem.c:110) ==10199== by 0x407D890: av_fast_realloc (utils.c:69) ==10199== by 0x407AC13: ff_combine_frame (parser.c:252) ==10199== by 0x43338DD: ff_aac_ac3_parse (aac_ac3_parser.c:62) ==10199== by 0x407A897: av_parser_parse (parser.c:136) ==10199== by 0x44E7EFB: av_read_frame_internal (utils.c:798) ==10199== by 0x44E860A: av_read_frame (utils.c:953) ==10199== by 0x80489D5: main (mf_read.c:74) ==10199== ==10199== LEAK SUMMARY: ==10199== definitely lost: 1,131,710 bytes in 102,757 blocks. ==10199== possibly lost: 39,443,024 bytes in 105 blocks. ==10199== still reachable: 35 bytes in 4 blocks. ==10199== suppressed: 0 bytes in 0 blocks. [root@DVB dvb_capture_minimal]# valgrind --leak-check=full --show-reachable=yes ./mf_read ==10244== Memcheck, a memory error detector. ==10244== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==10244== Using LibVEX rev 1804, a library for dynamic binary translation. ==10244== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==10244== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==10244== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==10244== For more details, rerun with: -v ==10244== input format: mpegts (0x45744a0) av_open_input_stream (dump02.ts), ret=0 av_find_stream_info, ret=3366 packets read: 25000 finished ==10244== ==10244== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 22 from 1) ==10244== malloc/free: in use at exit: 821,133 bytes in 2,152 blocks. ==10244== malloc/free: 266,860 allocs, 264,708 frees, 93,920,636 bytes allocated. ==10244== For counts of detected errors, rerun with: -v ==10244== searching for pointers to 2,152 not-freed blocks. ==10244== checked 1,839,632 bytes. ==10244== ==10244== 32 bytes in 3 blocks are possibly lost in loss record 1 of 4 ==10244== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10244== by 0x457BE42: av_malloc (mem.c:61) ==10244== by 0x452F591: getstr8 (mpegts.c:434) ==10244== by 0x453004B: sdt_cb (mpegts.c:761) ==10244== by 0x452F1BC: write_section_data (mpegts.c:271) ==10244== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10244== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10244== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10244== by 0x44E6F32: av_read_packet (utils.c:501) ==10244== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10244== by 0x44E860A: av_read_frame (utils.c:953) ==10244== by 0x80489D5: main (mf_read.c:74) ==10244== ==10244== ==10244== 21,573 bytes in 2,143 blocks are definitely lost in loss record 2 of 4 ==10244== at 0x4005F3F: memalign (vg_replace_malloc.c:460) ==10244== by 0x457BE42: av_malloc (mem.c:61) ==10244== by 0x452F591: getstr8 (mpegts.c:434) ==10244== by 0x453004B: sdt_cb (mpegts.c:761) ==10244== by 0x452F1BC: write_section_data (mpegts.c:271) ==10244== by 0x4530AAD: handle_packet (mpegts.c:1075) ==10244== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10244== by 0x453161F: mpegts_read_packet (mpegts.c:1366) ==10244== by 0x44E6F32: av_read_packet (utils.c:501) ==10244== by 0x44E80A9: av_read_frame_internal (utils.c:833) ==10244== by 0x44E860A: av_read_frame (utils.c:953) ==10244== by 0x80489D5: main (mf_read.c:74) ==10244== ==10244== ==10244== 104,276 bytes in 4 blocks are definitely lost in loss record 3 of 4 ==10244== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10244== by 0x457BE7A: av_realloc (mem.c:110) ==10244== by 0x44E4EF8: __dynarray_add (cutils.c:36) ==10244== by 0x44EC0C0: av_new_program (utils.c:2212) ==10244== by 0x452FDEE: pat_cb (mpegts.c:686) ==10244== by 0x452F1BC: write_section_data (mpegts.c:271) ==10244== by 0x4530A78: handle_packet (mpegts.c:1070) ==10244== by 0x4530CA7: handle_packets (mpegts.c:1149) ==10244== by 0x4531015: mpegts_read_header (mpegts.c:1249) ==10244== by 0x44E6BED: av_open_input_stream (utils.c:395) ==10244== by 0x44E6EBE: av_open_input_file (utils.c:481) ==10244== by 0x8048936: main (mf_read.c:64) ==10244== ==10244== ==10244== 695,252 bytes in 2 blocks are possibly lost in loss record 4 of 4 ==10244== at 0x4005E39: realloc (vg_replace_malloc.c:429) ==10244== by 0x457BE7A: av_realloc (mem.c:110) ==10244== by 0x407D890: av_fast_realloc (utils.c:69) ==10244== by 0x407AC13: ff_combine_frame (parser.c:252) ==10244== by 0x43338DD: ff_aac_ac3_parse (aac_ac3_parser.c:62) ==10244== by 0x407A897: av_parser_parse (parser.c:136) ==10244== by 0x44E7EFB: av_read_frame_internal (utils.c:798) ==10244== by 0x44E860A: av_read_frame (utils.c:953) ==10244== by 0x80489D5: main (mf_read.c:74) ==10244== ==10244== LEAK SUMMARY: ==10244== definitely lost: 125,849 bytes in 2,147 blocks. ==10244== possibly lost: 695,284 bytes in 5 blocks. ==10244== still reachable: 0 bytes in 0 blocks. ==10244== suppressed: 0 bytes in 0 blocks.