]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wmaprodec.c
doc/demuxers.texi: avoid comma splice in image2 documentation
[ffmpeg] / libavcodec / wmaprodec.c
index b60a25732919537b173bb41e960e7f617d76c71d..788c8fa3e780a53c8f317deee5f793157b7e8fa0 100644 (file)
@@ -341,6 +341,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
         return AVERROR_INVALIDDATA;
     }
 
+    if (s->avctx->sample_rate <= 0) {
+        av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     s->num_channels = avctx->channels;
 
     if (s->num_channels < 0) {