[xiph-commits] r9447 - trunk/theora/lib
xiphmont at motherfish-iii.xiph.org
xiphmont at motherfish-iii.xiph.org
Mon Jun 13 19:42:49 PDT 2005
Author: xiphmont
Date: 2005-06-13 19:42:47 -0700 (Mon, 13 Jun 2005)
New Revision: 9447
Modified:
trunk/theora/lib/toplevel.c
Log:
[22:31:40] <Andy_NJ> It's about a crash in theora_granule_time...
[22:32:21] <Andy_NJ> In a newsgroup I found a short discussion on that, unfortunately the discussion ended without answering my problem...
[22:33:06] <xiphmont> {I don't know about the newsgroup, but keep going}
[22:33:22] <Andy_NJ> There it was pointed out that theora_granule_time could crash because of the theora_state struct not beeing initialized properly
[22:33:38] <xiphmont> yes; you need to have successfully read the header for the function call to work.
[22:34:00] <Andy_NJ> I think I've done that.
[22:34:31] <Andy_NJ> The point is that when building the lib using encoder_disabled, the encoder part of the state get's not initizlied
[22:35:21] <xiphmont> [I wrote the original libtheora... three years ago; I'm unfamiliar with changes made since then, such as being able to build without the encoder]
[22:35:41] <xiphmont> let me have a quick look
[22:37:58] <Andy_NJ> That would be great...
[22:38:22] <xiphmont> OK... reading the code, the call only depends on decode state, however...
[22:38:39] <xiphmont> this relies on encode state being nulled; it's possible that part isn;t happening (looking)
[22:39:26] <xiphmont> In fact, that looks like the problem.
[22:41:06] <xiphmont> at a guess, add the following line:
[22:41:19] <xiphmont> th->internal_encode = NULL;
[22:41:30] <xiphmont> after line 298 in lib/toplevel.c
[22:42:18] <xiphmont> if you can give that a try and see if it solves the problem, I'll submit a bug report/patch.
Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c 2005-06-13 21:54:16 UTC (rev 9446)
+++ trunk/theora/lib/toplevel.c 2005-06-14 02:42:47 UTC (rev 9447)
@@ -296,6 +296,7 @@
ci=(codec_setup_info *)c->codec_setup;
memset(th, 0, sizeof(*th));
th->internal_decode=pbi=_ogg_calloc(1,sizeof(*pbi));
+ th->internal_encode=NULL;
InitPBInstance(pbi);
memcpy(&pbi->info,c,sizeof(*c));
More information about the commits
mailing list