Skip to contentSkip to conversation

sbcinfo.c frame_len problem?

Bluez-devel Brad Midgley 2 participants 4 messages Mar 15, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Henryk/Marcel...

This was in an anonymous bug reported at the sf project.

=====================================
In sbcinfo.c, the frame_len is calculated incorrectly.

195: frame_len[0] = count + 4;

The output of sbc_test_01.sbc results in:

Frame length 46 Bytes

instead of 42 (according to "A2DP Test v10.pdf").
=====================================

should the "+ 4" be dropped?

Brad

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Brad,

Quoted 7 lines

This was in an anonymous bug reported at the sf project.

=====================================
In sbcinfo.c, the frame_len is calculated incorrectly.

195: frame_len[0] = count + 4;

Quoted 8 lines

The output of sbc_test_01.sbc results in:

Frame length 46 Bytes

instead of 42 (according to "A2DP Test v10.pdf").
=====================================

should the "+ 4" be dropped?

I have no idea, but the question is if the calculation shows always four bytes too much?

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#2 lore raw

Hi Brad,

Quoted 11 lines
Quoted 11 lines

This was in an anonymous bug reported at the sf project.

=====================================
In sbcinfo.c, the frame_len is calculated incorrectly.

195: frame_len[0] = count + 4;

The output of sbc_test_01.sbc results in:

Frame length 46 Bytes

Quoted 7 lines
Quoted 4 lines

instead of 42 (according to "A2DP Test v10.pdf").
=====================================

should the "+ 4" be dropped?

I have no idea, but the question is if the calculation shows always four bytes too much?

actually the answer to this was easier then I thought. The bug is not in line 195. I don't even had to read the specification to find the answer to this problem. The display of the value is simply wrong.

sbcinfo.c 15 Mar 2005 07:49:28 -0000 renamed from sbcinfo.c 23 Nov 2004 09:12:22 -0000 1.3 +1 -1
diff -u -r1.3 sbcinfo.c
@@ -275,7 +275,7 @@
                                printf(", %d", bitpool[n]);
                printf("\n");
                printf("Number of frames\t%d\n", num);
-               printf("Frame length\t\t%d", frame_len[0] + 4);
+               printf("Frame length\t\t%d", frame_len[0]);
                for (n = 1; n < SIZE; n++)
                        if (frame_len[n] > 0)
                                printf(", %d", frame_len[n]);

You will see it when checking with sbc_test_09.sbc and sbc_test_10.sbc for example.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

Marcel

Quoted 3 lines

actually the answer to this was easier then I thought. The bug is not in line 195. I don't even had to read the specification to find the answer to this problem. The display of the value is simply wrong.

thanks! Sorry I didn't catch that. I closed the bug.

Brad

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel