]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/brstm.c
avcodec/h264, videotoolbox: do not return invalid frames on failure
[ffmpeg] / libavformat / brstm.c
index 4ac9881c995aa9e04a393fd8807ac741b4c5b673..bbdbcef6cbe31274e144bef83227fc2a09d640a6 100644 (file)
@@ -205,7 +205,7 @@ static int read_header(AVFormatContext *s)
     avio_skip(s->pb, 1); // padding
 
     st->codec->sample_rate = bfstm ? read32(s) : read16(s);
-    if (!st->codec->sample_rate)
+    if (st->codec->sample_rate <= 0)
         return AVERROR_INVALIDDATA;
 
     if (!bfstm)