[FFmpeg-devel] [PATCH] lavc: force *got_packet_ptr to 0 at the start of avcodec_encode_audio4()
stefasab at gmail.com
Mon Feb 6 20:58:57 CET 2012
On date Monday 2012-02-06 16:29:37 +0100, Michael Niedermayer encoded:
> On Mon, Feb 06, 2012 at 01:20:45PM +0100, Stefano Sabatini wrote:
> > Do not require the application level code to explicitely set *got_packet_ptr
> > to 0 before to call avcodec_encode_audio4(), thus removing possible cause
> > of errors.
> > This is also consistent with the avcodec_decode_video*() API.
After reading the docs I'm not anymore sure this is correct:
* @param[out] got_packet_ptr This field is set to 1 by libavcodec if the
* output packet is non-empty, and to 0 if it is
* empty. If the function returns an error, the
* packet can be assumed to be invalid, and the
* value of got_packet_ptr is undefined and should
* not be used.
even if I'm not so convinced that not marking *got_packet_ptr to NULL
is a good idea.
So patch dropped for the moment.
FFmpeg = Fantastic and Fast Merciless Problematic Extensive Goblin
More information about the ffmpeg-devel