Commit ba05c083 authored by aurel's avatar aurel

matroskadec: create new AVStream earlier

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14555 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d8dba187
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment