diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 00:40:09 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 00:40:09 +0000 |
commit | 28f450a99217df5ac2d6a7dc0e456369d48c64f3 (patch) | |
tree | 8e0678946d6d52e6018e6e4ab3c2555f548fe8c3 /libavformat | |
parent | fc4d335f6d5c4f211505b79371a8588a48376d21 (diff) | |
download | ffmpeg-28f450a99217df5ac2d6a7dc0e456369d48c64f3.tar.gz |
matroskadec: create new AVStream earlier
Originally committed as revision 14555 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskadec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 05656d8a07..f6f04f9e2a 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2563,6 +2563,10 @@ matroska_read_header (AVFormatContext *s, } } + 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 *s, 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; |