oggdemux: Fix duration calculation for truncated files

If the last page of a stream has a granulepos of -1, that is,
it doesn't complete a packet, we need to continue to search
for the last granulepos.
This commit is contained in:
David Schleef 2009-09-12 15:48:11 -07:00
parent df9b8b57b3
commit f126617dbd

View file

@ -2617,7 +2617,9 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
last_granule = granulepos;
last_pad = pad;
}
done = TRUE;
if (last_granule != -1) {
done = TRUE;
}
break;
}
}