summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/main.c
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2009-05-22 20:35:20 +0000
committerMohamed Tarek <mt@rockbox.org>2009-05-22 20:35:20 +0000
commit95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36 (patch)
tree9f708c255835ca590eedd10226ee4731abfb064f /apps/codecs/libcook/main.c
parentb63028d80ae665688a2202a2eaeb2e01e10ab520 (diff)
downloadrockbox-95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36.zip
rockbox-95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36.tar.gz
rockbox-95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36.tar.bz2
rockbox-95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36.tar.xz
Move the code segment that corrects the value of (number of packets) to
the parser. This is strictly parser-related and main.c shouldn't have to deal with it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21043 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libcook/main.c')
-rw-r--r--apps/codecs/libcook/main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/codecs/libcook/main.c b/apps/codecs/libcook/main.c
index 3557b15..f12e586 100644
--- a/apps/codecs/libcook/main.c
+++ b/apps/codecs/libcook/main.c
@@ -121,7 +121,7 @@ void close_wav(int fd, RMContext *rmctx) {
int main(int argc, char *argv[])
{
int fd, fd_dec;
- int res, datasize,x,i;
+ int res, datasize,i;
int nb_frames = 0;
#ifdef DUMP_RAW_FRAMES
char filename[15];
@@ -167,12 +167,6 @@ int main(int argc, char *argv[])
h = rmctx.sub_packet_h;
cook_decode_init(&rmctx,&q);
DEBUGF("nb_frames = %d\n",nb_frames);
- x = 0;
- if(packet_count % h)
- {
- packet_count += h - (packet_count % h);
- rmctx.nb_packets = packet_count;
- }
/* change the buffer pointer to point at the first audio frame */
advance_buffer(&filebuf, rmctx.data_offset+ DATA_HEADER_SIZE);