[FFmpeg-devel] [PATCH] ffmpeg: remove obsolete workaround in trim insertion.
Paul B Mahol
onemda at gmail.com
Mon Aug 12 12:57:32 CEST 2013
On 8/12/13, Nicolas George <nicolas.george at normalesup.org> wrote:
> Le quintidi 25 thermidor, an CCXXI, Paul B Mahol a ecrit :
>> ---
>> ffmpeg_filter.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Thanks, reproduced.
>
> The problem comes from the trim filter itself: it handles the default
> values
> of duration_dbl in an inconsistent way: sometimes it considers DBL_MAX the
> default value, sometimes 0:
>
> OFFSET(duration_dbl), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }
>
> but:
>
> if (s->duration_dbl != DBL_MAX)
>
> I suspect the best way to solve the problem would be to have both belts and
> suspenders: consider both DBL_MAX and 0 as default, and give precedence to
> duration (int) on top of that:
>
> if (!s->duration && s->duration_dbl != DBL_MAX && s->duration_dbl != 0)
>
> It fixes fate-lavf-mkv for me, I did not run the other tests for lack of
> CPU
> power.
Ah, thank you very much for spotting this. I think it should just
check for correct default value.
More information about the ffmpeg-devel
mailing list