Commit 441dce21 authored by Michael Niedermayer's avatar Michael Niedermayer

oggvorbis: move handling of first packets ts from parser to muxer.

The parser does not have enough knowledge it seems to do it
correctly.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bce42e95
......@@ -226,8 +226,7 @@ int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
previous_blocksize = s->blocksize[flag];
}
current_blocksize = s->mode_blocksize[mode];
if(previous_blocksize)
duration = (previous_blocksize + current_blocksize) >> 2;
duration = (previous_blocksize + current_blocksize) >> 2;
s->previous_blocksize = current_blocksize;
}
......
......@@ -323,7 +323,7 @@ static int vorbis_packet(AVFormatContext *s, int idx)
}
next_pkt += os->segments[seg];
}
os->lastpts = os->lastdts = os->granule - duration;
os->lastpts = os->lastdts = os->granule - FFMIN(duration, os->granule);
if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
s->streams[idx]->start_time = os->lastpts;
if (s->streams[idx]->duration)
......
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