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

aurel subversion
Tue Aug 5 02:40:09 CEST 2008


Author: aurel
Date: Tue Aug  5 02:40:09 2008
New Revision: 14555

Log:
matroskadec: create new AVStream earlier

Modified:
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Tue Aug  5 02:40:09 2008
@@ -2563,6 +2563,10 @@ matroska_read_header (AVFormatContext   
                 }
             }
 
+            st = track->stream = av_new_stream(s, matroska->num_streams++);
+            if (st == NULL)
+                return AVERROR(ENOMEM);
+
             /* Set the FourCC from the CodecID. */
             /* This is the MS compatibility mode which stores a
              * BITMAPINFOHEADER in the CodecPrivate. */
@@ -2681,9 +2685,6 @@ matroska_read_header (AVFormatContext   
                        track->codec_id);
             }
 
-            st = track->stream = av_new_stream(s, matroska->num_streams++);
-            if (st == NULL)
-                return AVERROR(ENOMEM);
             av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */
 
             st->codec->codec_id = codec_id;




More information about the ffmpeg-cvslog mailing list