mirror of https://git.ffmpeg.org/ffmpeg.git
matroskadec: create new AVStream earlier
Originally committed as revision 14555 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fc4d335f6d
commit
28f450a992
|
@ -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. */
|
/* Set the FourCC from the CodecID. */
|
||||||
/* This is the MS compatibility mode which stores a
|
/* This is the MS compatibility mode which stores a
|
||||||
* BITMAPINFOHEADER in the CodecPrivate. */
|
* BITMAPINFOHEADER in the CodecPrivate. */
|
||||||
|
@ -2681,9 +2685,6 @@ matroska_read_header (AVFormatContext *s,
|
||||||
track->codec_id);
|
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 */
|
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;
|
st->codec->codec_id = codec_id;
|
||||||
|
|
Loading…
Reference in New Issue