[FFmpeg-devel] [PATCH] Fix ffmpeg weird 'Unknown option' error messages

Stefano Sabatini stefano.sabatini-lala
Tue May 26 01:32:44 CEST 2009


On date Tuesday 2009-05-26 01:00:31 +0200, Michael Niedermayer encoded:
> On Tue, May 26, 2009 at 12:44:18AM +0200, Stefano Sabatini wrote:
> > Hi all,
> > after r18826 we have:
> > 
> > stefano at geppetto ~/s/ffmpeg> ffmpeg -foo bar
> > [...]
> > [NULL @ 0x8ae2290]Unknown option 'foo'
> > [swscaler @ 0x8ae3230]Unknown option 'foo'
> > ffmpeg: unrecognized option '-foo'
> > 
> > This is especially misleading for example when the option is currenly
> > present in some context:
> > 
> > stefano at geppetto ~/s/ffmpeg> ffmpeg -sws_flags +print_info
> > [...]
> > [NULL @ 0x9e06290]Unknown option 'sws_flags'
> > At least one output file must be specified
> > 
> > Patch fixes it.
> 
> patch is a mess

It simply checks that an option is present in a context before to try
to set it.

A possible alternative would be to inhibit the "unknown option"
message, reverting r18826, but this would be IMO wrong.

Can you see another solution?

Regards.
-- 
FFmpeg = Frenzy & Fundamental Magnificient Peaceful Embarassing Gymnast



More information about the ffmpeg-devel mailing list