#507 closed defect (fixed)
Memory leak in mpegts.c
Reported by: | Owned by: | ||
---|---|---|---|
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 found that approximately 250 bytes are leaked everytime we open a mpeg2
transport stream.
I have determined that the leaks are caused by not freeing the codec's extradata
in mpegts_read_close.
Thanks.
Attachments (1)
Change History (8)
by , 18 years ago
Attachment: | mpegts.c.patched added |
---|
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Owner: | changed from | to
---|
comment:3 by , 18 years ago
Status: | new → assigned |
---|
I'm a bit baffled by this. The MPEGTS demuxer never allocates any extradata,
so there should be none to free as suggested by the patch. Please provide a
test case.
comment:4 by , 18 years ago
Hi,
Sorry I haven't gotten back to you earlier. The extradata is allocated by
av_find_stream_info, not the TS demuxer.
I have noticed that this problem is pervasive across neraly all formats. The
only demuxer I have encountered so far that correctly frees the extradata in
read_close is avidec.c.
I can provide more information or sample content if still required.
comment:5 by , 18 years ago
If memory is allocated by generic code, it should be freed by generic code, not
individual demuxers. A leak is still a leak, of course.
Patch for freeing the codec's extradata on read_close.