aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2008-05-29 09:50:17 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-05-29 09:50:17 +0000
commit5faf168940d6a9787552637c260b18329453bda3 (patch)
tree2d55e81bff4e99ce7689f14f6f32ed72c6ff399c /libavformat/mpeg.c
parentea9c581f6100afc50aad4cf8f405ec9749144f71 (diff)
downloadffmpeg-5faf168940d6a9787552637c260b18329453bda3.tar.gz
Check return of url_fseek in mpeg timestamp reading code.
Patch by Joakim elupus ecce se Originally committed as revision 13527 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 3f508dcddf..ce58e10465 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -557,7 +557,9 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
#ifdef DEBUG_SEEK
printf("read_dts: pos=0x%"PRIx64" next=%d -> ", pos, find_next);
#endif
- url_fseek(s->pb, pos, SEEK_SET);
+ if (url_fseek(s->pb, pos, SEEK_SET) < 0)
+ return AV_NOPTS_VALUE;
+
for(;;) {
len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
if (len < 0) {