diff options
author | Joakim Plate <elupus@ecce.se> | 2011-09-14 19:25:43 +0200 |
---|---|---|
committer | Joakim Plate <elupus@ecce.se> | 2011-09-14 19:53:39 +0200 |
commit | 833358172b64120331485b4ceaaa2ae74f4a0461 (patch) | |
tree | 57c3c977b18110a71c3c5ab6d5944e193e15a684 /libavformat/jvdec.c | |
parent | 58540d7bd3561593d48f76db9096ede118a0a6b1 (diff) | |
download | ffmpeg-833358172b64120331485b4ceaaa2ae74f4a0461.tar.gz |
[jvd] Check return value of avio_seek and avoid modifying state if it fails
Diffstat (limited to 'libavformat/jvdec.c')
-rw-r--r-- | libavformat/jvdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c index ae070c5e96..42aae6f57a 100644 --- a/libavformat/jvdec.c +++ b/libavformat/jvdec.c @@ -207,10 +207,11 @@ static int read_seek(AVFormatContext *s, int stream_index, if (i < 0 || i >= ast->nb_index_entries) return 0; + if (avio_seek(s->pb, ast->index_entries[i].pos, SEEK_SET) < 0) + return -1; jv->state = JV_AUDIO; jv->pts = i; - avio_seek(s->pb, ast->index_entries[i].pos, SEEK_SET); return 0; } |