From 79c0790789668f07e414eb1205ddffa9fd8236f0 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 5 Oct 2009 09:19:42 +0000 Subject: [PATCH] Fix pcm_read_seek () when the position it calculates is greater than 2 GB. pcm_read_seek() puts the return value of url_fseek() in an int and then compares < 0 to see if an error occurred; if the position is greater than 2 GB, the 32-bit signed int result will be < 0. Change the type of ret to int64_t to avoid the wraparound. patch by Daniel Verkamp, daniel drv nu Originally committed as revision 20169 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/raw.c b/libavformat/raw.c index ed5f1ca73d..1449a20240 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -219,8 +219,8 @@ int pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { AVStream *st; - int block_align, byte_rate, ret; - int64_t pos; + int block_align, byte_rate; + int64_t pos, ret; st = s->streams[0];