[FFmpeg-devel] [PATCH 1/2] vf_paletteuse: Add error checking to apply_palette

Derek Buitenhuis derek.buitenhuis at gmail.com
Wed Jan 3 00:02:25 EET 2018


On 1/2/2018 9:52 PM, Clément Bœsch wrote:
> not exactly sure why you haven't just checked if `out` wasn't NULL, but it
> should be fine that way too if you prefer it.
> 
> I guess that's only to provide a finer grain error handling? It would make
> sense if ff_get_video_buffer was returning a meaningful error, but so far
> you're just assuming EINVAL when it could be ENOMEM, so I don't really get
> it.

s->set_frame can return ENOMEM, which is why I made it finer grained.

I'm not really sure what to return for ff_get_video_buffer failure, since
it wasn't designed with any error mechanism for some reason.

- Derek


More information about the ffmpeg-devel mailing list