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

Michael Niedermayer michaelni
Mon Oct 5 00:55:39 CEST 2009


On Sun, Oct 04, 2009 at 01:34:00PM -0700, Baptiste Coudurier wrote:
> On 6/18/09 10:07 PM, Baptiste Coudurier wrote:
>> Michael Niedermayer wrote:
>>> On Wed, May 27, 2009 at 11:37:42PM +0200, Stefano Sabatini wrote:
>>>> On date Wednesday 2009-05-27 04:01:54 +0200, Michael Niedermayer 
>>>> encoded:
>>>>> 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:
>>>> [...]
>>>>>>>> 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.
>>>> So should I revert it?
>>>
>>> if you want
>>
>> Well, IMHO av_set_string3 is right to print an error if the option does
>> not exists, it's an error.
>>
>> So IMHO patch is correct, application should not call it this way.
>>
>
> So what about this patch ? Can we please apply it to remove the annoying 
> nonsense messages ?

as i said av_set_string*() should not print these messages. They should
cleanly return the errorcode and let the user application decide or the user
application should redirect the av_log() output somehow.

with stefanos design, that is av_set_string() printing errors directly
for every little thing, things really cannot work. av_find_opt() should
then also print a "option not found message" for consistencies sake, this of
course doesnt work so why should av_set_string() print something for a failure
when av_find_opt() does not print anything for a failure ?
Its just not consistent or logic IMHO

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- 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/20091005/4a938cb8/attachment.pgp>



More information about the ffmpeg-devel mailing list