diff options
author | Joakim Plate <elupus@ecce.se> | 2012-02-03 19:13:44 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-10 15:27:49 -0500 |
commit | e54165aa392322bbeeb823fc33a17336e465b7b5 (patch) | |
tree | d80e04eaac105508621fdfaf8af82bf806e8a217 /libavformat | |
parent | 066ad0926a53ea6ee9d5cb3e348160a881145e73 (diff) | |
download | ffmpeg-e54165aa392322bbeeb823fc33a17336e465b7b5.tar.gz |
tta: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/tta.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c index 4d6bc0aff2..d7d41172d6 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -142,9 +142,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; } |