Hi, So I got a crash on the following code: k1=SUBMODE(lpc_enh_k1); k2=SUBMODE(lpc_enh_k2); which in the newer codebase is: bw_lpc(SUBMODE(lpc_enh_k1), st->interp_qlpc, awk1, st->lpcSize); bw_lpc(SUBMODE(lpc_enh_k2), st->interp_qlpc, awk2, st->lpcSize); I am not sure if the newer code will have the same issue but the following check is performed in nb_decode_lost, so I figure the same thing should be done in decode... right? add (or equivalent): if (st->submodes[st->submodeID] != NULL) { k1=SUBMODE(lpc_enh_k1); k2=SUBMODE(lpc_enh_k2); k3=(1-(1-r*k1)/(1-r*k2))/r; } else { k1=k2=0.7; k3 = 0.0f; } Tom ______________________________________________ Tom Harper Lead Software Engineer SightSpeed - <http://www.sightspeed.com/>http://www.sightspeed.com/ 918 Parker St, Suite A14 Berkeley, CA 94710 Email: tharper@sightspeed.com Phone: 510-665-2920 Fax: 510-649-9569 My SightSpeed Video Link: http://tom.sightspeed.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20051024/2f3ed3d1/attachment.htm
Le lundi 24 octobre 2005 ? 21:55 -0700, Tom Harper a ?crit :> Hi, > > So I got a crash on the following code: > k1=SUBMODE(lpc_enh_k1); > k2=SUBMODE(lpc_enh_k2); > which in the newer codebase is: > bw_lpc(SUBMODE(lpc_enh_k1), st->interp_qlpc, awk1, > st->lpcSize); > bw_lpc(SUBMODE(lpc_enh_k2), st->interp_qlpc, awk2, > st->lpcSize); >Are you really sure you didn't have some corruption elsewhere?> I am not sure if the newer code will have the same issue but the > following check is performed in nb_decode_lost, so I figure the > same thing should be done in decode... right? > > add (or equivalent): > > if (st->submodes[st->submodeID] != NULL) > { > k1=SUBMODE(lpc_enh_k1); > k2=SUBMODE(lpc_enh_k2); > k3=(1-(1-r*k1)/(1-r*k2))/r; > }else { > k1=k2=0.7; > k3 = 0.0f; > }Normally, this shouldn't be necessary because there's a check for st->submodes[st->submodeID] != NULL a bit before that.>Jean-Marc
re: At 03:22 PM 10/25/2005, Jean-Marc Valin wrote:>Are you really sure you didn't have some corruption elsewhere?Totally possible- this is the first time this has happened that I know of in many many hours of usage- On the other hand, this null check isn't in my code base and it was in nb_decode_lost, and nb_encode- so I figured it was just an oversight- Tom ______________________________________________ Tom Harper Lead Software Engineer SightSpeed - <http://www.sightspeed.com/>http://www.sightspeed.com/ 918 Parker St, Suite A14 Berkeley, CA 94710 Email: tharper@sightspeed.com Phone: 510-665-2920 Fax: 510-649-9569 My SightSpeed Video Link: http://tom.sightspeed.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20051025/fde1868b/attachment.htm