X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fnsvdec.c;h=92f7d178f68887e4fbee9c77f9a60d32bf07344c;hb=768b07e3bca7e81d2f9c60badb3973d3d88481dc;hp=d8ce656817cab7009362d692fee25d14d006f772;hpb=f082dcab7cdf94b6268917a6dc472d594d7538f0;p=ffmpeg diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index d8ce656817c..92f7d178f68 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -176,6 +176,7 @@ typedef struct NSVContext { int16_t avsync; AVRational framerate; uint32_t *nsvs_timestamps; + int nsvf; } NSVContext; static const AVCodecTag nsv_codec_video_tags[] = { @@ -266,6 +267,12 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) nsv->state = NSV_UNSYNC; /* in case we fail */ + if (nsv->nsvf) { + av_log(s, AV_LOG_TRACE, "Multiple NSVf\n"); + return 0; + } + nsv->nsvf = 1; + size = avio_rl32(pb); if (size < 28) return -1;