Commit 27b8ef5b authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0

Fixes Ticket3710
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5c57e2b5
......@@ -427,6 +427,10 @@ static int vorbis_packet(AVFormatContext *s, int idx)
}
os->lastpts =
os->lastdts = os->granule - duration;
if (!os->granule && duration) //hack to deal with broken files (Ticket3710)
os->lastpts = os->lastdts = AV_NOPTS_VALUE;
if (s->streams[idx]->start_time == AV_NOPTS_VALUE) {
s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
if (s->streams[idx]->duration != AV_NOPTS_VALUE)
......
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