summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2009-07-12 14:43:24 +0000
committerMohamed Tarek <mt@rockbox.org>2009-07-12 14:43:24 +0000
commit6258e24e0e48f9325a642673077b7d93c805e405 (patch)
tree26721a45fd99d68eb0f7e0d018f0357753c16406
parentedf3af2c68287943bbf8498965e80e7193279e5e (diff)
downloadrockbox-6258e24e0e48f9325a642673077b7d93c805e405.tar.gz
rockbox-6258e24e0e48f9325a642673077b7d93c805e405.zip
Some fixes for the standalone test program.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21807 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/librm/rm.c10
-rw-r--r--apps/metadata/rm.c4
2 files changed, 3 insertions, 11 deletions
diff --git a/apps/codecs/librm/rm.c b/apps/codecs/librm/rm.c
index 4f7ebe9bef..a126a5cad1 100644
--- a/apps/codecs/librm/rm.c
+++ b/apps/codecs/librm/rm.c
@@ -474,7 +474,7 @@ int real_parse_header(int fd, RMContext *rmctx)
474void rm_get_packet_fd(int fd,RMContext *rmctx, RMPacket *pkt) 474void rm_get_packet_fd(int fd,RMContext *rmctx, RMPacket *pkt)
475{ 475{
476 uint8_t unknown,packet_group; 476 uint8_t unknown,packet_group;
477 uint16_t x, place; 477 uint16_t x;
478 uint16_t sps = rmctx->sub_packet_size; 478 uint16_t sps = rmctx->sub_packet_size;
479 uint16_t h = rmctx->sub_packet_h; 479 uint16_t h = rmctx->sub_packet_h;
480 uint16_t y = rmctx->sub_packet_cnt; 480 uint16_t y = rmctx->sub_packet_cnt;
@@ -484,14 +484,6 @@ void rm_get_packet_fd(int fd,RMContext *rmctx, RMPacket *pkt)
484 { 484 {
485 y = rmctx->sub_packet_cnt; 485 y = rmctx->sub_packet_cnt;
486 read_uint16be(fd,&pkt->version); 486 read_uint16be(fd,&pkt->version);
487
488 /* Simple error checking */
489 if(pkt->version != 0 && pkt->version != 1)
490 {
491 DEBUGF("parsing packets failed\n");
492 return -1;
493 }
494
495 read_uint16be(fd,&pkt->length); 487 read_uint16be(fd,&pkt->length);
496 read_uint16be(fd,&pkt->stream_number); 488 read_uint16be(fd,&pkt->stream_number);
497 read_uint32be(fd,&pkt->timestamp); 489 read_uint32be(fd,&pkt->timestamp);
diff --git a/apps/metadata/rm.c b/apps/metadata/rm.c
index 612dd37317..2b3100b81a 100644
--- a/apps/metadata/rm.c
+++ b/apps/metadata/rm.c
@@ -31,7 +31,7 @@
31#include "metadata_parsers.h" 31#include "metadata_parsers.h"
32#include "logf.h" 32#include "logf.h"
33 33
34//#define DEBUG_RM 34#define DEBUG_RM
35#ifndef DEBUG_RM 35#ifndef DEBUG_RM
36#undef DEBUGF 36#undef DEBUGF
37#define DEBUGF(...) 37#define DEBUGF(...)
@@ -281,7 +281,7 @@ static int rm_parse_header(int fd, RMContext *rmctx, struct mp3entry *id3)
281 skipped += 40; 281 skipped += 40;
282 282
283 DEBUGF(" max_bitrate = %ld\n",max_bitrate); 283 DEBUGF(" max_bitrate = %ld\n",max_bitrate);
284 DEBUGF(" avg_bitrate = %ld\n",rmctx->bit_Rate); 284 DEBUGF(" avg_bitrate = %ld\n",rmctx->bit_rate);
285 DEBUGF(" max_packet_size = %ld\n",max_packet_size); 285 DEBUGF(" max_packet_size = %ld\n",max_packet_size);
286 DEBUGF(" avg_packet_size = %ld\n",avg_packet_size); 286 DEBUGF(" avg_packet_size = %ld\n",avg_packet_size);
287 DEBUGF(" packet_count = %ld\n",packet_count); 287 DEBUGF(" packet_count = %ld\n",packet_count);