Mercurial > libavformat.hg
changeset 3635:318d5e2f9aed libavformat
matroskadec: create new AVStream earlier
author | aurel |
---|---|
date | Tue, 05 Aug 2008 00:40:09 +0000 |
parents | f206f746ff61 |
children | 1f8f906eb49e |
files | matroskadec.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Tue Aug 05 00:40:06 2008 +0000 +++ b/matroskadec.c Tue Aug 05 00:40:09 2008 +0000 @@ -2563,6 +2563,10 @@ } } + 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 @@ 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;