[FFmpeg-devel] [PATCH] ffmpeg: remove obsolete workaround in trim insertion.

Nicolas George nicolas.george at normalesup.org
Mon Aug 12 12:26:11 CEST 2013


Le quintidi 25 thermidor, an CCXXI, Paul B Mahol a écrit :
> ---
>  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.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130812/5cfa237e/attachment.asc>


More information about the ffmpeg-devel mailing list