summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-05-02 20:07:11 +0000
committerMohamed Tarek <mt@rockbox.org>2010-05-02 20:07:11 +0000
commit2fa864b9e6d0b700a45f34feb039283134b9c5fb (patch)
tree04416dc762db7c0cd5ff1f72cae40796d21f618b
parent9a74223f7df26090c3d4e91b00c78912e9d156f9 (diff)
downloadrockbox-2fa864b9e6d0b700a45f34feb039283134b9c5fb.tar.gz
rockbox-2fa864b9e6d0b700a45f34feb039283134b9c5fb.zip
Remove unnecessary parameter (struct codec_api* ci) passed to libasf functions, and consequently remove the no-longer needed #ifdef in apps/codecs/libasf/asf.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25788 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libasf/asf.c4
-rw-r--r--apps/codecs/libasf/asf.h8
-rw-r--r--apps/codecs/wma.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/codecs/libasf/asf.c b/apps/codecs/libasf/asf.c
index e3fffe6ee0..18503218b7 100644
--- a/apps/codecs/libasf/asf.c
+++ b/apps/codecs/libasf/asf.c
@@ -49,7 +49,7 @@ static unsigned short get_short_le(void* buf)
0 : *(data) : get_short_le(data) : get_long_le(data))
int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
- asf_waveformatex_t* wfx, struct codec_api* ci)
+ asf_waveformatex_t* wfx)
{
uint8_t tmp8, packet_flags, packet_property;
int stream_id;
@@ -291,7 +291,7 @@ int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
}
-int asf_get_timestamp(int *duration, struct codec_api* ci)
+int asf_get_timestamp(int *duration)
{
uint8_t tmp8, packet_flags, packet_property;
int ec_length, opaque_data, ec_length_type;
diff --git a/apps/codecs/libasf/asf.h b/apps/codecs/libasf/asf.h
index 2007e08e86..7ea57c5f65 100644
--- a/apps/codecs/libasf/asf.h
+++ b/apps/codecs/libasf/asf.h
@@ -36,11 +36,11 @@ struct asf_waveformatex_s {
typedef struct asf_waveformatex_s asf_waveformatex_t;
/* Define the packet-specific functions only for codecs not for metadata parsers */
-#ifdef __CODECLIB_H__
+
int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
- asf_waveformatex_t* wfx, struct codec_api* ci);
+ asf_waveformatex_t* wfx);
-int asf_get_timestamp(int *duration, struct codec_api* ci);
-#endif
+int asf_get_timestamp(int *duration);
+
#endif /* _ASF_H */
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c
index 8aed7c34b6..235f1a38c9 100644
--- a/apps/codecs/wma.c
+++ b/apps/codecs/wma.c
@@ -60,7 +60,7 @@ static int seek(int ms, asf_waveformatex_t* wfx)
count++;
/*check the time stamp of our packet*/
- time = asf_get_timestamp(&duration, ci);
+ time = asf_get_timestamp(&duration);
DEBUGF("seeked to %d ms with duration %d\n", time, duration);
if (time < 0) {
@@ -68,7 +68,7 @@ static int seek(int ms, asf_waveformatex_t* wfx)
DEBUGF("UKNOWN SEEK ERROR\n");
ci->seek_buffer(ci->id3->first_frame_offset+initial_packet*wfx->packet_size);
/*seek failed so return time stamp of the initial packet*/
- return asf_get_timestamp(&duration, ci);
+ return asf_get_timestamp(&duration);
}
if ((time+duration>=ms && time<=ms) || count > 10) {
@@ -141,7 +141,7 @@ restart_track:
int packet_offset = (resume_offset - ci->id3->first_frame_offset)
% wfx.packet_size;
ci->seek_buffer(resume_offset - packet_offset);
- elapsedtime = asf_get_timestamp(&i, ci);
+ elapsedtime = asf_get_timestamp(&i);
ci->set_elapsed(elapsedtime);
}
else
@@ -190,7 +190,7 @@ restart_track:
}
errcount = 0;
new_packet:
- res = asf_read_packet(&audiobuf, &audiobufsize, &packetlength, &wfx, ci);
+ res = asf_read_packet(&audiobuf, &audiobufsize, &packetlength, &wfx);
if (res < 0) {
/* We'll try to recover from a parse error a certain number of