[FFmpeg-cvslog] lavf/wav: Read files >4G if no smaller filesize was written.
Carl Eugen Hoyos
git at videolan.org
Sun May 17 03:05:04 CEST 2015
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat May 16 23:33:48 2015 +0200| [2acc06565321fde44faf407679c9c211aacaca08] | committer: Carl Eugen Hoyos
lavf/wav: Read files >4G if no smaller filesize was written.
Fixes second part of ticket #4543.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2acc06565321fde44faf407679c9c211aacaca08
---
libavformat/wavdec.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 410c2ec..befc664 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -335,9 +335,14 @@ 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 {
+ av_log(s, AV_LOG_WARNING, "Ignoring maximum wav data size, "
+ "file may be invalid\n");
+ data_size = 0;
+ next_tag_ofs = wav->data_end = INT64_MAX;
}
data_ofs = avio_tell(pb);
More information about the ffmpeg-cvslog
mailing list