matroskadec: request a read buffer for the wav header
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 12 Mar 2013 17:56:28 +0000 (18:56 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 12 Mar 2013 19:05:39 +0000 (20:05 +0100)
Solve an infiniloop.

CC: libav-stable@libav.org
(cherry picked from commit 37cb3b180a1dc3d6f123f68e0806585ebc2578b6)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/matroskadec.c

index 59e0e1f..891eb83 100644 (file)
@@ -1415,7 +1415,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
                    && track->codec_priv.data != NULL) {
             int ret;
             ffio_init_context(&b, track->codec_priv.data, track->codec_priv.size,
-                          AVIO_FLAG_READ, NULL, NULL, NULL, NULL);
+                              0, NULL, NULL, NULL, NULL);
             ret = ff_get_wav_header(&b, st->codec, track->codec_priv.size);
             if (ret < 0)
                 return ret;