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

Michael Niedermayer michaelni
Wed May 27 04:01:54 CEST 2009


On Tue, May 26, 2009 at 10:13:42PM +0200, Stefano Sabatini wrote:
> 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

so you do know of a single function in the standard c lib that does not
follow this statement?


> 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
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090527/51995252/attachment.pgp>



More information about the ffmpeg-devel mailing list