oggdemux: only keep last valid granulepos
Only keep the last valid granulepos we see when scanning the last pages. It is possible that the last page that we inspect has a -1 granulepos, in which case we want to keep the previous valid time instead. Fixes #631703
This commit is contained in:
parent
9dc59cff15
commit
fea50233bb
@ -2827,9 +2827,9 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain)
|
|||||||
if (pad->map.serialno == ogg_page_serialno (&og)) {
|
if (pad->map.serialno == ogg_page_serialno (&og)) {
|
||||||
gint64 granulepos = ogg_page_granulepos (&og);
|
gint64 granulepos = ogg_page_granulepos (&og);
|
||||||
|
|
||||||
last_granule = granulepos;
|
if (granulepos != -1) {
|
||||||
last_pad = pad;
|
last_granule = granulepos;
|
||||||
if (last_granule != -1) {
|
last_pad = pad;
|
||||||
done = TRUE;
|
done = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user