diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-10-12 16:03:36 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-10-12 16:06:57 +0200 |
commit | fea50233bb0d2ba54b142e735fa300e2191f3dbd (patch) | |
tree | abecb19a509bb6681843f1f5a4c0ccd38ea5f865 /ext | |
parent | 9dc59cff151bf578012a735d0791ab4767debda6 (diff) |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ogg/gstoggdemux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index c4e64c85f..bb20a8150 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2827,9 +2827,9 @@ gst_ogg_demux_read_end_chain (GstOggDemux * ogg, GstOggChain * chain) if (pad->map.serialno == ogg_page_serialno (&og)) { gint64 granulepos = ogg_page_granulepos (&og); - last_granule = granulepos; - last_pad = pad; - if (last_granule != -1) { + if (granulepos != -1) { + last_granule = granulepos; + last_pad = pad; done = TRUE; } break; |