aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-08-20 22:30:15 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-08-20 22:30:15 +0000
commitdc3e0211ed6203aee04473e5aa09aafeaa8ec55c (patch)
treeda66f1967480b4a4b7a7e45d483e13922cf1a065
parent3ef6182556f7f8a4044c1d7da1212989e655e6b2 (diff)
downloadffmpeg-dc3e0211ed6203aee04473e5aa09aafeaa8ec55c.tar.gz
matroskadec: stop parsing when skipping en element crossing over the end of file
Originally committed as revision 14869 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4f8bbbe2e2..1eb6d585ea 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -765,7 +765,7 @@ static int ebml_parse_elem(MatroskaDemuxContext *matroska,
return ebml_parse_nest(matroska, syntax->def.n, data);
case EBML_PASS: return ebml_parse_id(matroska, syntax->def.n, id, data);
case EBML_STOP: *(int *)data = 1; return 1;
- default: url_fskip(pb, length); return 0;
+ default: return url_fseek(pb,length,SEEK_CUR)<0 ? AVERROR(EIO) : 0;
}
if (res == AVERROR_INVALIDDATA)
av_log(matroska->ctx, AV_LOG_ERROR, "Invalid element\n");