aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorSean Soria <sean.soria@gmail.com>2009-12-06 00:03:53 +0000
committerDaniel Verkamp <daniel@drv.nu>2009-12-06 00:03:53 +0000
commitb593f7fdef3448ea0fadfccc0bd7e4fde3df84aa (patch)
tree145d6888238c649fcdbc01547cea2b9a1f6727e0 /libavformat/utils.c
parenta4605efdf51f1a900d0a6404c5a938f4443416bf (diff)
downloadffmpeg-b593f7fdef3448ea0fadfccc0bd7e4fde3df84aa.tar.gz
Calls to url_fseek should have their return value checked in
av_seek_frame_binary, just as they do in av_seek_frame_generic. Otherwise, function may return success even though url_fseek reported failure. Patch by Sean Soria, first.last at gmail Originally committed as revision 20744 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 82d1adb25f..98f670d489 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1311,6 +1311,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
int64_t ts_min, ts_max, ts;
int index;
+ int64_t ret;
AVStream *st;
if (stream_index < 0)
@@ -1363,7 +1364,8 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
return -1;
/* do the seek */
- url_fseek(s->pb, pos, SEEK_SET);
+ if ((ret = url_fseek(s->pb, pos, SEEK_SET)) < 0)
+ return ret;
av_update_cur_dts(s, st, ts);