diff options
-rw-r--r-- | apps/codecs/librm/rm.c | 10 | ||||
-rw-r--r-- | apps/metadata/rm.c | 4 |
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) | |||
474 | void rm_get_packet_fd(int fd,RMContext *rmctx, RMPacket *pkt) | 474 | void 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); |