[FFmpeg-devel] [PATCH] mjpegdec: Do not assume unused plane pointer are NULL.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Feb 26 13:00:39 CET 2016


On Fri, Feb 26, 2016 at 12:40:19PM +0100, Clément Bœsch wrote:
> On Fri, Feb 26, 2016 at 11:29:05AM +0100, wm4 wrote:
> > Unfortunately I have to agree. I got some crashes in libavfilter when I
> > didn't set some "unused" plane pointers to NULL. Some code is just lazy
> > and checks plane pointers for NULL, instead of retrieving the proper
> > plane count.
> 
> lavfi seems to do both sometimes. For example:

Note that lavfi in some ways is less problematic at least for left-over
pointers as the filters will not generally switch output formats
in the middle of processing I believe?
Still the variants here might mean we maybe should have an easy of
getting "number of planes" from an AVFrame and use that instead...
Still, that is more of a "what next" question...


More information about the ffmpeg-devel mailing list