On Sun, Aug 09, 2020 at 12:56:53PM +0200, Nicolas George wrote:
> If an input has an undefined timestamp, the computation
> for silence at stitches can overflow.
> 
> Partial fix for trac ticket #8843.
> 
> Signed-off-by: Nicolas George <geo...@nsup.org>
> ---
>  libavfilter/avf_concat.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 
> "Partial fix" means it does not segfault and exits with an error instead.
> 
> The actual problem in this ticket is amix sending a frame with no PTS.
> 
> 
> diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c
> index 246628498a..f376f72754 100644
> --- a/libavfilter/avf_concat.c
> +++ b/libavfilter/avf_concat.c
> @@ -179,6 +179,10 @@ static int push_frame(AVFilterContext *ctx, unsigned 
> in_no, AVFrame *buf)
>      AVFilterLink *outlink = ctx->outputs[out_no];
>      struct concat_in *in = &cat->in[in_no];
>  
> +    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 ?

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)

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to