From 90840bc0e061864e0e51915dfd3dfa97039ea6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 23 May 2006 15:18:40 +0000 Subject: [PATCH] ext/theora/theoradec.c: Make work with time-stamped input buffers that do not have a granulepos in BUFFER_OFFSET_END ... Original commit message from CVS: * ext/theora/theoradec.c: (theora_dec_chain): Make work with time-stamped input buffers that do not have a granulepos in BUFFER_OFFSET_END (like theora buffers coming from matroskademux). Fixes #342448. --- ChangeLog | 7 +++++++ ext/theora/theoradec.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 38979e5b1a..65ba81c4db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-23 Tim-Philipp Müller + + * ext/theora/theoradec.c: (theora_dec_chain): + Make work with time-stamped input buffers that do not + have a granulepos in BUFFER_OFFSET_END (like theora + buffers coming from matroskademux). Fixes #342448. + 2006-05-22 Tim-Philipp Müller Patch by: Peter Kjellerstedt diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index 77ba63ce23..f813aef9b2 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -1134,6 +1134,8 @@ theora_dec_chain (GstPad * pad, GstBuffer * buf) } else if (dec->last_timestamp != -1) { dec->last_timestamp = _theora_granule_time (dec, dec->granulepos); } + if (dec->last_timestamp == -1 && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) + dec->last_timestamp = GST_BUFFER_TIMESTAMP (buf); } else { dec->last_timestamp = -1; }