Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#506 closed defect (fixed)

Memory leak when opening mp4 with extra streams

Reported by: codon1@… Owned by: mans@…
Priority: normal Component: libavformat
Version: unspecified Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:



I have discovered a memory leak when opening mp4s that contain streams of type

The stream is freed, but not the stream's codec, which is alloc'ed from
av_new_stream. Valgrind reports the leak as follows :

==18739== 269100 bytes in 345 blocks are definitely lost in loss record 594 of
==18739== at 0x1B901DF0: memalign (vg_replace_malloc.c:332)
==18739== by 0x1D2B50E7: av_malloc (mem.c:62)
==18739== by 0x1D2B4B20: avcodec_alloc_context (utils.c:805)
==18739== by 0x1D20F8C3: av_new_stream (utils.c:2209)
==18739== by 0x1D22DD6E: mov_read_trak (mov.c:1355)
==18739== by 0x1D22C126: mov_read_default (mov.c:464)
==18739== by 0x1D22C622: mov_read_moov (mov.c:662)
==18739== by 0x1D22C126: mov_read_default (mov.c:464)
==18739== by 0x1D22F3E3: mov_read_header (mov.c:1679)
==18739== by 0x1D20FA1D: av_open_input_stream (utils.c:498)
==18739== by 0x1D212165: av_open_input_file (utils.c:611)

Thank you.

Attachments (1)

mov.c.diff (446 bytes) - added by codon1@… 13 years ago.
This patch resolves the issue

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by codon1@…

This patch resolves the issue

comment:1 Changed 13 years ago by codon1@…

comment:2 Changed 13 years ago by diego@…

  • Owner changed from diego@… to mru@…

comment:3 Changed 13 years ago by mans@…

Is this still an issue with latest source from SVN?

comment:4 Changed 13 years ago by mans@…

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed, and no response from reporter.

Note: See TracTickets for help on using tickets.