Hi Daniel,

On Thu, Jul 28, 2011 at 3:00 PM, Daniel Kristjansson
<[email protected]> wrote:
>
> The attached patch will copy MPEG user data during an ffmpeg
> transcode from one mpeg-2 to another. But as is it leaks
> memory. The section where the memory is allocated is marked
> with "TODO FIXME leaks memory" but I have no idea where this
> memory should be freed.
>
> When I've added av_freep() where I thought it made sense I was
> seeing multiple free's. I have a hunch that copy_picture_attributes
> is not doing the right thing; should I be copying the data not
> the pointers? But I was hoping someone here might be able to point
> me in the right direction before I spin my wheels any more on
> this.
>
> I think this is a fairly useful patch as it allows you to transcode
> to a lower resolution or a different frame-rate while keeping the
> 608/708 captions and other metadata.

It uses static globals, which I consider a big no. I think the right
thing to do here is to demux these captions, stream them as
AVMEDIA_TYPE_SUBTITLES or AVMEDIA_TYPE_DATA (or even metadata in
regular buffers), and "stream" them like that from demuxer to muxer.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to