Commit 339a360a authored by Michael Smith's avatar Michael Smith
Browse files

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.
parent bfe6a780
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),
common @ 8b37d7ee
Subproject commit 3c5473161ce19a3530bad279b842d542895b1500
Subproject commit 8b37d7ee833fab1d25b484d8574df3dae231b5f2
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment