diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-20 22:30:15 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-20 22:30:15 +0000 |
commit | dc3e0211ed6203aee04473e5aa09aafeaa8ec55c (patch) | |
tree | da66f1967480b4a4b7a7e45d483e13922cf1a065 /libavformat | |
parent | 3ef6182556f7f8a4044c1d7da1212989e655e6b2 (diff) | |
download | ffmpeg-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
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskadec.c | 2 |
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"); |