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.
This commit is contained in:
Tim-Philipp Müller 2006-05-23 15:18:40 +00:00
parent 5839fa1d23
commit 90840bc0e0
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2006-05-23 Tim-Philipp Müller <tim at centricular dot net>
* 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 <tim at centricular dot net>
Patch by: Peter Kjellerstedt <pkj at axis com>

View file

@ -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;
}