[FFmpeg-devel] [oggvp8] Don't manipulate duration when it's AV_NOPTS_VALUE.

James Almer jamrial at gmail.com
Wed Nov 29 05:53:29 EET 2017


On 11/28/2017 7:28 PM, Dale Curtis wrote:
> This leads to signed integer overflow.
> 
> Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
> 
> 
> ogg_vp8_v1.patch
> 
> 
> From c1fa869b79aeb314f30746a561903fcfa8f305fb Mon Sep 17 00:00:00 2001
> From: Dale Curtis <dalecurtis at chromium.org>
> Date: Tue, 28 Nov 2017 14:26:55 -0800
> Subject: [PATCH] [oggvp8] Don't manipulate duration when it's AV_NOPTS_VALUE.
> 
> This leads to signed integer overflow.
> 
> Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
> ---
>  libavformat/oggparsevp8.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/oggparsevp8.c b/libavformat/oggparsevp8.c
> index c534ab117d..b76ac71cc5 100644
> --- a/libavformat/oggparsevp8.c
> +++ b/libavformat/oggparsevp8.c
> @@ -125,7 +125,7 @@ static int vp8_packet(AVFormatContext *s, int idx)
>          os->lastdts = vp8_gptopts(s, idx, os->granule, NULL) - duration;
>          if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
>              s->streams[idx]->start_time = os->lastpts;
> -            if (s->streams[idx]->duration)
> +            if (s->streams[idx]->duration && s->streams[idx]->duration != AV_NOPTS_VALUE)
>                  s->streams[idx]->duration -= s->streams[idx]->start_time;
>          }
>      }
> -- 2.15.0.417.g466bffb3ac-goog

Applied, thanks!


More information about the ffmpeg-devel mailing list