Opened 18 years ago

Closed 18 years ago

Last modified 18 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: no Analyzed by developer: no

Description

Hello,

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

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
594
==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@… 18 years ago.
This patch resolves the issue

Download all attachments as: .zip

Change History (5)

by codon1@…, 18 years ago

Attachment: mov.c.diff added

This patch resolves the issue

comment:1 by codon1@…, 18 years ago

comment:2 by diego@…, 18 years ago

Owner: changed from diego@… to mru@…

comment:3 by mans@…, 18 years ago

Is this still an issue with latest source from SVN?

comment:4 by mans@…, 18 years ago

Resolution: fixed
Status: newclosed

Should be fixed, and no response from reporter.

Note: See TracTickets for help on using tickets.