[FFmpeg-devel] [PATCH] avcodec_default_get_buffer should fail instead of returning nonsense for unsupported formats
Mon Feb 23 16:08:31 CET 2009
On Mon, Feb 23, 2009 at 12:46:13PM +0100, Reimar D?ffinger wrote:
> currently avcodec_default_get_buffer returns complete nonsense when
> calling it e.g. to request a VDPAU format.
> An obvious solution is to check the return value of ff_fill_pointer,
> if it is -1 continuing (and treating -1 as size) obviously makes no
> I suspect that some stuff might need to be freed, e.g.
> undone but I still have hope that there is someone who knows the code
> well enough to implement it correctly so I don't have to try to
> understand all of it.
> This is the change I had in mind and at least fixes a crash if
> get_buffer is not overridden but a hardware-accelerated pixfmt selected:
your patch looks ok
about picture_number, after get_buffer fails teh decoder will crash or
fail fatally its value should with some luck not matter.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel