X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fgdv.c;h=b698497a6a85df096ccf7c15e359316e808b6673;hb=4e7e30bbe0fbe54d44cadc398d4071905d3063e8;hp=a69c349cab3c48abe60ceffd8f804b2a464369e7;hpb=b1b0e532583e26f18ba27f3cc8775dbd62f3bc2b;p=ffmpeg diff --git a/libavformat/gdv.c b/libavformat/gdv.c index a69c349cab3..b698497a6a8 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -34,7 +34,7 @@ typedef struct GDVContext { unsigned pal[256]; } GDVContext; -static int gdv_read_probe(AVProbeData *p) +static int gdv_read_probe(const AVProbeData *p) { if (AV_RL32(p->buf) == 0x29111994) return AVPROBE_SCORE_MAX; @@ -86,6 +86,9 @@ static int gdv_read_header(AVFormatContext *ctx) vst->nb_frames = avio_rl16(pb); fps = avio_rl16(pb); + if (!fps) + return AVERROR_INVALIDDATA; + snd_flags = avio_rl16(pb); if (snd_flags & 1) { ast = avformat_new_stream(ctx, 0);