[FFmpeg-cvslog] r14585 - trunk/libavformat/matroskadec.c

aurel subversion
Tue Aug 5 02:41:41 CEST 2008


Author: aurel
Date: Tue Aug  5 02:41:40 2008
New Revision: 14585

Log:
matroskadec: extract read_level_up out of ebml_read_element_id

Modified:
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Tue Aug  5 02:41:40 2008
@@ -559,10 +559,6 @@ ebml_read_element_id (MatroskaDemuxConte
         return read;
     *id = matroska->peek_id  = total | (1 << (read * 7));
 
-    /* level tracking */
-    if (level_up)
-        *level_up = ebml_read_element_level_up(matroska);
-
     return read;
 }
 
@@ -591,10 +587,15 @@ ebml_peek_id (MatroskaDemuxContext *matr
               int                  *level_up)
 {
     uint32_t id;
+    int res;
 
-    if (ebml_read_element_id(matroska, &id, level_up) < 0)
+    res = ebml_read_element_id(matroska, &id, NULL);
+    if (res < 0)
         return 0;
 
+    if (res > 0 && level_up)
+        *level_up = ebml_read_element_level_up(matroska);
+
     return id;
 }
 




More information about the ffmpeg-cvslog mailing list