ext/theora/theoradec.c: Increment granulepos for new-bitstream versions appropriately.

Original commit message from CVS:
* ext/theora/theoradec.c: (_theora_granule_frame),
(_inc_granulepos):
Increment granulepos for new-bitstream versions appropriately.
Fixes #514623.
This commit is contained in:
Michael Smith 2008-02-06 13:35:58 +00:00
parent bfe6a78043
commit 339a360a96
3 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2008-02-06 Michael Smith <msmith@fluendo.com>
* ext/theora/theoradec.c: (_theora_granule_frame),
(_inc_granulepos):
Increment granulepos for new-bitstream versions appropriately.
Fixes #514623.
2008-02-04 Wim Taymans <wim.taymans@collabora.co.uk>
* tests/examples/seek/seek.c: (do_seek),

2
common

@ -1 +1 @@
Subproject commit 3c5473161ce19a3530bad279b842d542895b1500
Subproject commit 8b37d7ee833fab1d25b484d8574df3dae231b5f2

View file

@ -230,7 +230,7 @@ _theora_granule_frame (GstTheoraDec * dec, gint64 granulepos)
framenum = granulepos >> ilog;
framenum += granulepos - (framenum << ilog);
/* This is 1-based for current libtheora, 0 based for old. Fix up. */
/* This is 0-based for old bitstreams, 1-based for new. Fix up. */
if (!dec->is_old_bitstream)
framenum -= 1;
@ -266,7 +266,8 @@ _inc_granulepos (GstTheoraDec * dec, gint64 granulepos)
framecount = _theora_granule_frame (dec, granulepos);
return (framecount + 1) << dec->granule_shift;
return (framecount + 1 +
(dec->is_old_bitstream ? 0 : 1)) << dec->granule_shift;
}
#if 0