]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rpl.c
avformat/rpl: Check the number of streams
[ffmpeg] / libavformat / rpl.c
index c79419d558e1b72c81b5a8edee6c2f010bac22d4..b98488c7b17be0f862adb15284fb92149b07a851 100644 (file)
@@ -253,6 +253,9 @@ static int rpl_read_header(AVFormatContext *s)
             error |= read_line(pb, line, sizeof(line));
     }
 
+    if (s->nb_streams == 0)
+        return AVERROR_INVALIDDATA;
+
     rpl->frames_per_chunk = read_line_and_int(pb, &error);  // video frames per chunk
     if (vst && rpl->frames_per_chunk > 1 && vst->codecpar->codec_tag != 124)
         av_log(s, AV_LOG_WARNING,