[FFmpeg-cvslog] [tta] Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate
git at videolan.org
Wed Sep 14 20:05:37 CEST 2011
ffmpeg | branch: master | Joakim Plate <elupus at ecce.se> | Wed Sep 14 19:33:20 2011 +0200| [d9d7174d70cb291ce9fc7a5e1fc1a420bbb729cb] | committer: Joakim Plate
[tta] Check return value of avio_seek and avoid modifying state if it fails
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9d7174d70cb291ce9fc7a5e1fc1a420bbb729cb
---
libavformat/tta.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 5b07b09..23e54b2 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -137,9 +137,10 @@ static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
int index = av_index_search_timestamp(st, timestamp, flags);
if (index < 0)
return -1;
+ if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
+ return -1;
c->currentframe = index;
- avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
return 0;
}
More information about the ffmpeg-cvslog
mailing list