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

Stefano Sabatini stefano.sabatini-lala
Tue May 26 22:13:42 CEST 2009


On date Tuesday 2009-05-26 03:25:04 +0200, Michael Niedermayer encoded:
> On Tue, May 26, 2009 at 01:32:44AM +0200, Stefano Sabatini wrote:
> > 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?
> 
> functions should not print errors that might not be errors to the appliction

Sorry but this looks like a distorted way of thinking, functions
should print errors when it makes sense, they should be the
applications to adapt themselves to the library and not vice-versa.

That said, I'll revert r18826 if there is no better solution for that.

Regards.
-- 
FFmpeg = Fostering Funny Mere Philosofic Exploitable Gorilla



More information about the ffmpeg-devel mailing list