mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
Set nb_frames.
Also add DXSA tag (commited by mistake in this commit, i can revert and recommit seperately if someone wants) Originally committed as revision 21619 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f04c6e35d4
commit
bce8840a4e
@ -251,7 +251,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
ByteIOContext *pb = s->pb;
|
ByteIOContext *pb = s->pb;
|
||||||
unsigned int tag, tag1, handler;
|
unsigned int tag, tag1, handler;
|
||||||
int codec_type, stream_index, frame_period, bit_rate;
|
int codec_type, stream_index, frame_period, bit_rate;
|
||||||
unsigned int size, nb_frames;
|
unsigned int size;
|
||||||
int i;
|
int i;
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVIStream *ast = NULL;
|
AVIStream *ast = NULL;
|
||||||
@ -412,10 +412,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
av_set_pts_info(st, 64, ast->scale, ast->rate);
|
av_set_pts_info(st, 64, ast->scale, ast->rate);
|
||||||
|
|
||||||
ast->cum_len=get_le32(pb); /* start */
|
ast->cum_len=get_le32(pb); /* start */
|
||||||
nb_frames = get_le32(pb);
|
st->nb_frames = get_le32(pb);
|
||||||
|
|
||||||
st->start_time = 0;
|
st->start_time = 0;
|
||||||
st->duration = nb_frames;
|
st->duration = st->nb_frames;
|
||||||
get_le32(pb); /* buffer size */
|
get_le32(pb); /* buffer size */
|
||||||
get_le32(pb); /* quality */
|
get_le32(pb); /* quality */
|
||||||
ast->sample_size = get_le32(pb); /* sample ssize */
|
ast->sample_size = get_le32(pb); /* sample ssize */
|
||||||
@ -476,7 +476,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
get_le32(pb); /* ClrUsed */
|
get_le32(pb); /* ClrUsed */
|
||||||
get_le32(pb); /* ClrImportant */
|
get_le32(pb); /* ClrImportant */
|
||||||
|
|
||||||
if (tag1 == MKTAG('D', 'X', 'S', 'B')) {
|
if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
|
||||||
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
|
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
|
||||||
st->codec->codec_tag = tag1;
|
st->codec->codec_tag = tag1;
|
||||||
st->codec->codec_id = CODEC_ID_XSUB;
|
st->codec->codec_id = CODEC_ID_XSUB;
|
||||||
|
Loading…
Reference in New Issue
Block a user