From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [Bluez-devel] sbcinfo.c frame_len problem? From: Marcel Holtmann To: BlueZ Mailing List In-Reply-To: <1110872684.8820.3.camel@pegasus> References: <42368844.7010000@xmission.com> <1110872684.8820.3.camel@pegasus> Content-Type: text/plain Message-Id: <1110873260.8820.8.camel@pegasus> Mime-Version: 1.0 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Tue, 15 Mar 2005 08:54:19 +0100 Hi Brad, > > 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? > > 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. diff -u -r1.3 sbcinfo.c --- sbcinfo.c 23 Nov 2004 09:12:22 -0000 1.3 +++ sbcinfo.c 15 Mar 2005 07:49:28 -0000 @@ -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 Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel