From bc86d4239a196237c920dbd824b44f4122a935a7 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 23 Feb 2017 17:09:23 -0700 Subject: [PATCH] libav: fix reading wmv larger than 2G fixes https://github.com/HandBrake/HandBrake/issues/587 --- contrib/ffmpeg/A15-asf-2G.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 contrib/ffmpeg/A15-asf-2G.patch diff --git a/contrib/ffmpeg/A15-asf-2G.patch b/contrib/ffmpeg/A15-asf-2G.patch new file mode 100644 index 000000000..4b5f350be --- /dev/null +++ b/contrib/ffmpeg/A15-asf-2G.patch @@ -0,0 +1,27 @@ +From 93de850f0fe3dc0084aba1933b57f0a0c0344d15 Mon Sep 17 00:00:00 2001 +From: John Stebbins +Date: Thu, 23 Feb 2017 16:47:58 -0700 +Subject: [PATCH] asfdec: fix reading files larger than 2GB + +avio_skip returns file position and overflows int +--- + libavformat/asfdec.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c +index 34730b2..10d3396 100644 +--- a/libavformat/asfdec.c ++++ b/libavformat/asfdec.c +@@ -976,7 +976,8 @@ static int asf_read_simple_index(AVFormatContext *s, const GUIDParseTable *g) + uint64_t interval; // index entry time interval in 100 ns units, usually it's 1s + uint32_t pkt_num, nb_entries; + int32_t prev_pkt_num = -1; +- int i, ret; ++ int i; ++ int64_t ret; + uint64_t size = avio_rl64(pb); + + // simple index objects should be ordered by stream number, this loop tries to find +-- +2.9.3 + -- 2.40.0