[FFmpeg-devel] [PATCH] avformat/riffenc: fix handling monowhite when pix_fmt is not set

Mats Peterson matsp888 at yahoo.com
Tue Feb 23 15:56:41 CET 2016


On 02/23/2016 03:54 PM, Michael Niedermayer wrote:
> On Tue, Feb 23, 2016 at 01:41:54PM +0100, Mats Peterson wrote:
>> On 02/23/2016 01:11 PM, Michael Niedermayer wrote:
>>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>>
>> When is pix_fmt AV_PIX_FMT_NONE in this context? Sorry if I sound
>> uninitiated.
>
> the pix_fmt describes the decoder output and encoder input
> demuxers may set it but do not have to (especially if theres nothing
> in their headers that contains that information)
>
> AV_PIX_FMT_NONE is the default if it has not been set
>
> this is documented in the header defining the field (avcodec.h)
>

That sounds overly paranoid. I haven't been able to produce a case where 
the pixel format is AV_PIX_FMT_NONE here. But alright. But what "enum 
AVPixelFormat pix_fmt = enc->pix_fmt"? What good does it do? 
enc->pix_fmt is already a proper AVPixelFormat enum.

Mats

-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/



More information about the ffmpeg-devel mailing list