OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88ad794
)
[mxfdec] Check return value of avio_seek and avoid modifying state if it fails
author
Joakim Plate
<elupus@ecce.se>
Wed, 14 Sep 2011 17:26:48 +0000
(19:26 +0200)
committer
Joakim Plate
<elupus@ecce.se>
Wed, 14 Sep 2011 17:53:45 +0000
(19:53 +0200)
libavformat/mxfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/mxfdec.c
b/libavformat/mxfdec.c
index
307a2b2
..
9adeb1f
100644
(file)
--- a/
libavformat/mxfdec.c
+++ b/
libavformat/mxfdec.c
@@
-1119,7
+1119,8
@@
static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
if (sample_time < 0)
sample_time = 0;
seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
- avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
+ if (avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET) < 0)
+ return -1;
av_update_cur_dts(s, st, sample_time);
return 0;
}