[FFmpeg-devel] regression - mpeg2 interlace/topfield flags not set anymore
Víctor Paesa
wzrlpy
Sat Jan 26 11:39:21 CET 2008
Hi,
christophelorenz said:
> Michael Niedermayer wrote:
>
>>On Thu, Jan 24, 2008 at 03:46:50PM +0100, christophelorenz wrote:
>>
>>
>>>Seems something has changed between rev 10908 and current causing the
>>> interlaced and field order flag to be set to a wrong value.
>>>
>>>ffmpeg -i "source.avi" -y -flags +ildct+ilme -bufsize 2000k -b 7600k
>>> -maxrate 8000k -top 1 -vcodec mpeg2video output.m2v
>>>
>>>
>>
>>bug not reproduceable tff/interlaced flags are correct
>>-> closed/invalid
>>
>>[...]
>>
>>
> I have been able to locate the problem and conditions more precisely :
>
> All linux builds are ok, it only happens under win32.
> It doesn't depend on the source material format.
> It happens with my builds, and other win32 binaries found on the net.
>
> After building a bunch or revisions, I found the problem appeared when
> moving to rev 11142.
>
> The only affected file is ffmpeg.c from rev 11117 to 11142 done by
> michael commented "Fix non-numeric AVOptions."
>
> I took rev 11608 and reverted some code to locate the problem and found
> out that reverting the last change of ffmpeg.c fixes the problem.
>
> on svn, last ffmpeg.c line 3278 :
> for(i=0; i<opt_name_count; i++){
> char buf[256];
> const AVOption *opt;
> const char *str= av_get_string(avformat_opts, opt_names[i],
> &opt, buf, sizeof(buf));
> if(str && (opt->flags & AV_OPT_FLAG_ENCODING_PARAM))
> av_set_string(oc, opt_names[i], str);
> }
>
> replaced by previous code : (from rev 11117)
> for(i=0; i<opt_name_count; i++){
> const AVOption *opt;
> double d = av_get_double(avformat_opts, opt_names[i], &opt);
> if(!isnan(d) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
> av_set_double(oc, opt_names[i], d);
> }
>
> Restore the correct operation on interlaced mpegs.
>
> Obviously a simple arg parsing problem... but I must say I have no clue
> why current rev it doesn't work as expected, more specifically under
> win32...
> I'll add some debug dump to see what happens, meanwhile if someone has
> an idea ;-)
I compiled SVN-11604 and more than Win32 the problem seems to be MinGW
specific:
gcc 3.4.4 compiling to Cygwin honors interlacing & -top.
gcc 3.4.4 crosscompiling to MinGW doesn't honor them.
Regards,
V?ctor
More information about the ffmpeg-devel
mailing list