Re: Filesize Bug in NJB3 Workaround
Linus Walleij <[email protected]> Thu, 22 Sep 2005 12:17:18 +0200 (CEST)
| Newsgroups | gmane.comp.multimedia.libnjb.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 22 Sep 2005, Richard Low wrote:
> An XNJB user has alerted me to this bug in the NJB3 record feature.
No surprise... Must be a firmware bug.
> 1107,1114c1107
> <
> < if (chunk_size > remain)
> < {
> < printf("LIBNJB panic: chunk_size > remain,
> going to get whole chunk and see what happens\n");
> < size += (chunk_size - remain);
> < remain = chunk_size;
^^^^^^^^^^^^^^^^^^^^
This should work partially but worries me, what happens if even
more than what can be fitted in the current chunk remains? Perhaps we
should actually test against the chunk max size, and if remain == max
chunk, even try to get one more byte or something, so that it is adjusted
upwards.
On the other hand it is a corner case anyway so perhaps we needn't care.
> < }
> < else if ( chunk_size == -1 ) {
> ---
>> if ( chunk_size == -1 ) {
Apart from the remark it looks OK but I cannot apply this patch as of now,
the codebase is changed, could you make a patch against CVS? (Else I'll
try to make it on a fresh 2.2.3 and diff it to the CVS, but this could
introduce errors on my part.)
Linus
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php