diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-06-04 23:11:47 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-06-04 23:11:47 +0000 |
commit | fc4738ae963989967215238e82b76b2fcb52db6a (patch) | |
tree | 2581096b1b684edea1fe0461548003fe6b9bc0be /libavformat/matroskadec.c | |
parent | d9e5c9b7189b628791aa6809d3ec4d2ea2408a01 (diff) | |
download | ffmpeg-streaming-fc4738ae963989967215238e82b76b2fcb52db6a.zip ffmpeg-streaming-fc4738ae963989967215238e82b76b2fcb52db6a.tar.gz |
matroskadec: don't remove dummy level when none was added
Originally committed as revision 13657 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 89ce071..f71589c 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1888,6 +1888,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska) case MATROSKA_ID_SEEKENTRY: { uint32_t seek_id = 0, peek_id_cache = 0; uint64_t seek_pos = (uint64_t) -1, t; + int dummy_level = 0; if ((res = ebml_read_master(matroska, &id)) < 0) break; @@ -1964,6 +1965,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska) level.length = (uint64_t)-1; matroska->levels[matroska->num_levels] = level; matroska->num_levels++; + dummy_level = 1; /* check ID */ if (!(id = ebml_peek_id (matroska, @@ -2000,6 +2002,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska) finish: /* remove dummy level */ + if (dummy_level) while (matroska->num_levels) { matroska->num_levels--; length = |