Hi!
Valid wav files are not larger than 4G, files that are
larger are truncated by current FFmpeg.
Attached patch allows reading such files if the size
was (imo "correctly") written to -1.
Please comment, Carl Eugen
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 410c2ec..332f643 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -335,9 +335,12 @@ static int wav_read_header(AVFormatContext *s)
if (rf64) {
next_tag_ofs = wav->data_end = avio_tell(pb) + data_size;
- } else {
+ } else if (size != 0xFFFFFFFF) {
data_size = size;
next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX;
+ } else {
+ data_size = 0;
+ next_tag_ofs = wav->data_end = INT64_MAX;
}
data_ofs = avio_tell(pb);
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel