Davy Durham | 8 Sep 08:58

afInitDataOffset() bug

Hey.. I'm working on ReZound's raw format support and I noticed that 
when afInitDataOffset() is used  when initializing the afSetup, 
afGetFrameCount() still returns the same value as if the data offset was 
zero.  So, you end up trying to read more frames than there are if the 
data offset is given > 0.  

I can easily subtract the offset*frameSize from the reported frame 
count, but I thought it would make more sense for the library to do that.  

Should I do the subtract or submit a patch which fixes the bug for raw 
setups?

Thanks,
  Davy

Michael Pruett | 11 Sep 03:25
Picon

Re: afInitDataOffset() bug

On Sun, Sep 08, 2002 at 01:58:37AM -0500, Davy Durham wrote:
> Hey.. I'm working on ReZound's raw format support and I noticed that 
> when afInitDataOffset() is used  when initializing the afSetup, 
> afGetFrameCount() still returns the same value as if the data offset was 
> zero.  So, you end up trying to read more frames than there are if the 
> data offset is given > 0.  
> 
> I can easily subtract the offset*frameSize from the reported frame 
> count, but I thought it would make more sense for the library to do that.  
> 
> Should I do the subtract or submit a patch which fixes the bug for raw 
> setups?

Davy, you're right.  Feel free to send me a patch.

Michael

Michael Pruett | 12 Sep 02:47
Picon

Re: afInitDataOffset() bug

On Sun, Sep 08, 2002 at 01:58:37AM -0500, Davy Durham wrote:
> Hey.. I'm working on ReZound's raw format support and I noticed that 
> when afInitDataOffset() is used  when initializing the afSetup, 
> afGetFrameCount() still returns the same value as if the data offset was 
> zero.  So, you end up trying to read more frames than there are if the 
> data offset is given > 0.  

I've checked in a fix for this problem.  Please look at the current CVS
version and ensure that the fix is satisfactory.

Thanks,
Michael

Davy Durham | 12 Sep 06:05

Re: afInitDataOffset() bug

Michael Pruett wrote:

>On Sun, Sep 08, 2002 at 01:58:37AM -0500, Davy Durham wrote:
>  
>
>>Hey.. I'm working on ReZound's raw format support and I noticed that 
>>when afInitDataOffset() is used  when initializing the afSetup, 
>>afGetFrameCount() still returns the same value as if the data offset was 
>>zero.  So, you end up trying to read more frames than there are if the 
>>data offset is given > 0.  
>>    
>>
>
>I've checked in a fix for this problem.  Please look at the current CVS
>version and ensure that the fix is satisfactory.
>
>Thanks,
>Michael
>
>
>  
>
Yes, thank you; this looks good... And I do get an error reported if I 
use it incorrectly.

Favicon

GNOME Multimedia mailing list

Hi everyone,
I have now set up a new mailing list at gnome.org for discussing GNOME
multimedia development. The list is meant to allow multimedia developers
all across the GNOME and GTK+ world to come togheter to discuss issues
of interoperability, library development, and general issues related to
developing multimedia applications for GTK+ and GNOME. I hope as many as
possible of you will join the list and the effort to bring multimedia
support under GNOME 2 forward.

You find details on the list at:
http://mail.gnome.org/mailman/listinfo/gnome-multimedia

Sincerely,
Christian


Gmane