[FFmpeg-devel] [PATCH 2/2] lavfi/avf_concat: check input timestamp.
Nicolas George
george at nsup.org
Sun Aug 23 13:31:34 EEST 2020
Michael Niedermayer (12020-08-23):
> > + if (buf->pts == AV_NOPTS_VALUE) {
> > + av_log(ctx, AV_LOG_ERROR, "Frame without timestamp on input %d\n", in_no);
> > + return AVERROR(EINVAL);
> > + }
>
> what if the timestamp is "AV_NOPTS_VALUE + 1" ?
> would that work or overflow ?
I have no idea, I suspect it would overflow too. But "every single
filter that needs valid timestamps" is not the place to protect against
overflows caused by widely invalid timestamps. The framework is; I have
considered going at it, some kind of "require_valid_pts" flag on input
pads, but it is not my priority right now.
This test is already too much, it should be part of the framework, but
it is very simple and protects against a real current bug.
> also could the filter not use the previous frame pts + "duration" when a PTS
> is unavailable (maybe that would make sense in some cases) (with a warning)
Not really.
First, again, an individual filter is not the place to implement an
heuristic.
Second, duration is not part of lavfi's working at all, and could not be
without a significant redesign of many filters, and increasing the
latency.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200823/56fecaa7/attachment.sig>
More information about the ffmpeg-devel
mailing list