summaryrefslogtreecommitdiff
path: root/libavformat/wav.c
diff options
context:
space:
mode:
authorDaniel Verkamp <daniel@drv.nu>2010-02-10 20:26:47 +0000
committerDaniel Verkamp <daniel@drv.nu>2010-02-10 20:26:47 +0000
commitb7e0f88f2b3bb36a7a0ad1417e90ea6409b7d685 (patch)
treefbb2ebb422e4d0a4c10ff90ec34b385acc6ec727 /libavformat/wav.c
parent40938d9382c8438df76b2cf9039c40b4479678f1 (diff)
Fix demuxing of wav files with broken data header
Originally committed as revision 21746 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r--libavformat/wav.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index f4b2d615c2..5faa63edca 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -227,6 +227,9 @@ static int wav_read_header(AVFormatContext *s,
size = data_size;
if (size < 0)
return -1;
+ if (!size) {
+ wav->data_end = INT64_MAX;
+ } else
wav->data_end= url_ftell(pb) + size;
return 0;
}