1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-05 01:41:54 +02:00
parent bce42e95d1
commit 441dce2169
2 changed files with 2 additions and 3 deletions

View File

@ -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;
}

View File

@ -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)