[FFmpeg-devel] [libav-devel] [PATCH 1/4] avcodec/a64multienc: use av_frame_ref instead of copying the frame
andreas.cadhalpun at googlemail.com
Mon Feb 23 18:15:49 CET 2015
On 23.02.2015 16:06, Luca Barbato wrote:
> On 23/02/15 16:02, Andreas Cadhalpun wrote:
>> Why should coded_frame be allocated? Is this documented somewhere?
> In the doxygen documentation.
It's a bit terse:
the picture in the bitstream
- encoding: Set by libavcodec.
- decoding: unused
>> It seems many audio encoders don't do that, as well as e.g.
>> libopenh264enc and libwebpenc.
> Either the documentation or the encoders should be fixed.
The documentation could definitely be improved by making it clearer,
when coded_frame has to be allocated.
Note that usage of coded_frame was removed from most audio codecs in
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
So the documentation should probably say that it's only required to be
set for video codecs. Attached is a patch for that.
Ensuring this rule could be done with a dummy codec_frame as Michael
>> Anyway, the memleak can also be fixed by adding av_frame_unref(p) before
>> the av_frame_ref.
> I was guessing right then =)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 814 bytes
Desc: not available
More information about the ffmpeg-devel