Commit f126617d authored by David Schleef's avatar David Schleef

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.
parent df9b8b57
......@@ -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;
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