diff mbox

[FFmpeg-devel] cmdutils - don't search for option 'default'

Message ID a5bfdb7e-dd91-b41b-458d-eebce2b11ab5@gmail.com
State New
Headers show

Commit Message

Gyan May 16, 2018, 3:51 p.m. UTC
From 20a0544d66b5b3b9ebc3e03049a134d13706bda9 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@gyani.pro>
Date: Wed, 16 May 2018 20:18:30 +0530
Subject: [PATCH] cmdutils - don't search for option 'default'

The option 'default' was removed in
af4b1c02acf6923489d30349c4813a0d73b2f114 - Dec 20 2012.
---
 fftools/cmdutils.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Niedermayer May 17, 2018, 8:49 a.m. UTC | #1
On Wed, May 16, 2018 at 09:21:49PM +0530, Gyan Doshi wrote:
> 

>  cmdutils.c |    2 --
>  1 file changed, 2 deletions(-)
> 495ccaae10f8873dc5070858d11c0c3093ce92b4  0001-cmdutils-don-t-search-for-option-default.patch
> From 20a0544d66b5b3b9ebc3e03049a134d13706bda9 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi <ffmpeg@gyani.pro>
> Date: Wed, 16 May 2018 20:18:30 +0530
> Subject: [PATCH] cmdutils - don't search for option 'default'
> 
> The option 'default' was removed in
> af4b1c02acf6923489d30349c4813a0d73b2f114 - Dec 20 2012.
> ---
>  fftools/cmdutils.c | 2 --
>  1 file changed, 2 deletions(-)

breaks fate (alot of fate tests)

[...]
Gyan May 17, 2018, 11:10 a.m. UTC | #2
On 5/17/2018 2:19 PM, Michael Niedermayer wrote:
> On Wed, May 16, 2018 at 09:21:49PM +0530, Gyan Doshi wrote:
>>
> 
>>   cmdutils.c |    2 --
>>   1 file changed, 2 deletions(-)
>> 495ccaae10f8873dc5070858d11c0c3093ce92b4  0001-cmdutils-don-t-search-for-option-default.patch
>>  From 20a0544d66b5b3b9ebc3e03049a134d13706bda9 Mon Sep 17 00:00:00 2001
>> From: Gyan Doshi <ffmpeg@gyani.pro>
>> Date: Wed, 16 May 2018 20:18:30 +0530
>> Subject: [PATCH] cmdutils - don't search for option 'default'
>>
>> The option 'default' was removed in
>> af4b1c02acf6923489d30349c4813a0d73b2f114 - Dec 20 2012.
>> ---
>>   fftools/cmdutils.c | 2 --
>>   1 file changed, 2 deletions(-)
> 
> breaks fate (alot of fate tests)

Can you identify some of these tests?


I ran FATE with a full build; only two feature libs linked - freetype 
and LAME.

Out of the 3636 tests ran, 16 failed; none of which look related to my 
patch.

For sake of completeness, these are the tests that failed.

concat-demuxer-extended-lavf-mxf.err
concat-demuxer-extended-lavf-mxf_d10.err
concat-demuxer-simple1-lavf-mxf.err
concat-demuxer-simple1-lavf-mxf_d10.err
concat-demuxer-simple2-lavf-ts.err
filter-metadata-avf-aphase-meter-out-of-phase.err
filter-metadata-cropdetect.err
filter-metadata-ebur128.err
filter-metadata-readvitc-def.err
filter-metadata-readvitc-thr.err
filter-metadata-scenedetect.err
filter-metadata-silencedetect.err
source.err
sub-cc-realtime.err
sub-cc-scte20.err
sub-cc.err

Of these, 10 failed (and have always failed) because of 
avformat_open_file errors. Since I'm running this in MSYS2,

'/ffmpeg/fate-suite/folder/samplefile'

gets translated to

'G:/Code/ffmpeg/fate-suite/folder/samplefile'

avformat_open_file is passed arg of 'G' and fails. This happens in 8 tests.

avformat_open_file complains in 2 others of not finding files even as 
the passed arg remain Unix-style mounted path. Both files exist and can 
be opened with

     ffmpeg -i same-unquoted-path-spec

The 5 concat demuxer .err files are empty. Since this component opens 
files, I suspect it's the same issue.

fate-source fails because libavcodec/nellymoser.h is identified as not 
having 'standard inclusion guards'. False positive or does the ref need 
updating?

So, none of the failures look related to the patch.

Regards,
Gyan
Michael Niedermayer May 18, 2018, 1:34 a.m. UTC | #3
On Thu, May 17, 2018 at 04:40:44PM +0530, Gyan Doshi wrote:
> 
> On 5/17/2018 2:19 PM, Michael Niedermayer wrote:
> >On Wed, May 16, 2018 at 09:21:49PM +0530, Gyan Doshi wrote:
> >>
> >
> >>  cmdutils.c |    2 --
> >>  1 file changed, 2 deletions(-)
> >>495ccaae10f8873dc5070858d11c0c3093ce92b4  0001-cmdutils-don-t-search-for-option-default.patch
> >> From 20a0544d66b5b3b9ebc3e03049a134d13706bda9 Mon Sep 17 00:00:00 2001
> >>From: Gyan Doshi <ffmpeg@gyani.pro>
> >>Date: Wed, 16 May 2018 20:18:30 +0530
> >>Subject: [PATCH] cmdutils - don't search for option 'default'
> >>
> >>The option 'default' was removed in
> >>af4b1c02acf6923489d30349c4813a0d73b2f114 - Dec 20 2012.
> >>---
> >>  fftools/cmdutils.c | 2 --
> >>  1 file changed, 2 deletions(-)
> >
> >breaks fate (alot of fate tests)
> 
> Can you identify some of these tests?

sure

make: *** [fate-mpegts-probe-pmt-merge] Error 1
make: *** [fate-concat-demuxer-simple1-lavf-mxf_d10] Error 1
make: *** [fate-concat-demuxer-extended-lavf-mxf_d10] Error 1
make: *** [fate-concat-demuxer-simple1-lavf-mxf] Error 1
make: *** [fate-concat-demuxer-simple2-lavf-ts] Error 1
make: *** [fate-concat-demuxer-extended-lavf-mxf] Error 1

[...]
Hendrik Leppkes May 18, 2018, 8:38 a.m. UTC | #4
On Thu, May 17, 2018 at 1:10 PM, Gyan Doshi <gyandoshi@gmail.com> wrote:
>
> Of these, 10 failed (and have always failed) because of avformat_open_file
> errors. Since I'm running this in MSYS2,
>
> '/ffmpeg/fate-suite/folder/samplefile'
>
> gets translated to
>
> 'G:/Code/ffmpeg/fate-suite/folder/samplefile'
>
> avformat_open_file is passed arg of 'G' and fails. This happens in 8 tests.
>
>

You can avoid that by using a relative path to the samples. FATE does
not properly quote/escape pathes for windows absolute pathes to work.
Making sure that fate passes without your changes first is essential
to find regressions.

- Hendrik
Gyan May 18, 2018, 10:07 a.m. UTC | #5
On 5/18/2018 2:08 PM, Hendrik Leppkes wrote:

> 
> You can avoid that by using a relative path to the samples. FATE does
> not properly quote/escape pathes for windows absolute pathes to work.

That works. 0 fails.

Thanks,
Gyan
Gyan May 18, 2018, 10:09 a.m. UTC | #6
On 5/18/2018 7:04 AM, Michael Niedermayer wrote:

> 
> make: *** [fate-mpegts-probe-pmt-merge] Error 1
> make: *** [fate-concat-demuxer-simple1-lavf-mxf_d10] Error 1
> make: *** [fate-concat-demuxer-extended-lavf-mxf_d10] Error 1
> make: *** [fate-concat-demuxer-simple1-lavf-mxf] Error 1
> make: *** [fate-concat-demuxer-simple2-lavf-ts] Error 1
> make: *** [fate-concat-demuxer-extended-lavf-mxf] Error 1

Patch withdrawn. ffprobe retains 'default' in order to set codec/format 
options.

Thanks,
Gyan
diff mbox

Patch

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 8ffc9d240b..7fca78cb97 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -362,8 +362,6 @@  int parse_option(void *optctx, const char *opt, const char *arg,
     } else if (po->flags & OPT_BOOL)
         arg = "1";
 
-    if (!po->name)
-        po = find_option(options, "default");
     if (!po->name) {
         av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt);
         return AVERROR(EINVAL);