From 4c343f9d06235adb6aa5913cd3c369587349299e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 17 Apr 2003 12:30:20 +0000 Subject: [PATCH] Fixed the process calls - the third parameter is not the "last_frame" flag anymore but the timecode. --- r_ac3.cpp | 14 +++----------- r_mp3.cpp | 11 ++++------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/r_ac3.cpp b/r_ac3.cpp index 77bf7208e..af6251dcc 100644 --- a/r_ac3.cpp +++ b/r_ac3.cpp @@ -13,7 +13,7 @@ /*! \file - \version \$Id: r_ac3.cpp,v 1.10 2003/04/13 15:23:03 mosu Exp $ + \version \$Id: r_ac3.cpp,v 1.11 2003/04/17 12:30:00 mosu Exp $ \brief AC3 demultiplexer module \author Moritz Bunkus */ @@ -100,7 +100,7 @@ ac3_reader_c::~ac3_reader_c() { } int ac3_reader_c::read() { - int nread, last_frame; + int nread; do { if (ac3packetizer->packet_available()) @@ -110,17 +110,9 @@ int ac3_reader_c::read() { if (nread <= 0) return 0; - if (nread < 4096) - last_frame = 1; - else - last_frame = 0; - - ac3packetizer->process(chunk, nread, last_frame); + ac3packetizer->process(chunk, nread); bytes_processed += nread; - if (last_frame) - return 0; - } while (1); } diff --git a/r_mp3.cpp b/r_mp3.cpp index 62aa93d71..18435b85a 100644 --- a/r_mp3.cpp +++ b/r_mp3.cpp @@ -13,7 +13,7 @@ /*! \file - \version \$Id: r_mp3.cpp,v 1.9 2003/04/13 15:23:03 mosu Exp $ + \version \$Id: r_mp3.cpp,v 1.10 2003/04/17 12:30:20 mosu Exp $ \brief MP3 reader module \author Moritz Bunkus */ @@ -70,7 +70,7 @@ mp3_reader_c::mp3_reader_c(track_info_t *nti) throw (error_c): int pos; unsigned long header; mp3_header_t mp3header; - + if ((file = fopen(ti->fname, "r")) == NULL) throw error_c("mp3_reader: Could not open source file."); if (fseek(file, 0, SEEK_END) != 0) @@ -109,7 +109,7 @@ mp3_reader_c::~mp3_reader_c() { } int mp3_reader_c::read() { - int nread, last_frame; + int nread; do { if (mp3packetizer->packet_available()) @@ -119,12 +119,9 @@ int mp3_reader_c::read() { if (nread <= 0) return 0; - last_frame = (nread == 4096 ? 0 : 1); - mp3packetizer->process(chunk, nread, last_frame); + mp3packetizer->process(chunk, nread); bytes_processed += nread; - if (last_frame) - return 0; } while (1); }