summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-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)
49 0 : *(data) : get_short_le(data) : get_long_le(data)) 49 0 : *(data) : get_short_le(data) : get_long_le(data))
50 50
51int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength, 51int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
52 asf_waveformatex_t* wfx, struct codec_api* ci) 52 asf_waveformatex_t* wfx)
53{ 53{
54 uint8_t tmp8, packet_flags, packet_property; 54 uint8_t tmp8, packet_flags, packet_property;
55 int stream_id; 55 int stream_id;
@@ -291,7 +291,7 @@ int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
291} 291}
292 292
293 293
294int asf_get_timestamp(int *duration, struct codec_api* ci) 294int asf_get_timestamp(int *duration)
295{ 295{
296 uint8_t tmp8, packet_flags, packet_property; 296 uint8_t tmp8, packet_flags, packet_property;
297 int ec_length, opaque_data, ec_length_type; 297 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 {
36typedef struct asf_waveformatex_s asf_waveformatex_t; 36typedef struct asf_waveformatex_s asf_waveformatex_t;
37 37
38/* Define the packet-specific functions only for codecs not for metadata parsers */ 38/* Define the packet-specific functions only for codecs not for metadata parsers */
39#ifdef __CODECLIB_H__ 39
40int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength, 40int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
41 asf_waveformatex_t* wfx, struct codec_api* ci); 41 asf_waveformatex_t* wfx);
42 42
43int asf_get_timestamp(int *duration, struct codec_api* ci); 43int asf_get_timestamp(int *duration);
44#endif 44
45 45
46#endif /* _ASF_H */ 46#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)
60 count++; 60 count++;
61 61
62 /*check the time stamp of our packet*/ 62 /*check the time stamp of our packet*/
63 time = asf_get_timestamp(&duration, ci); 63 time = asf_get_timestamp(&duration);
64 DEBUGF("seeked to %d ms with duration %d\n", time, duration); 64 DEBUGF("seeked to %d ms with duration %d\n", time, duration);
65 65
66 if (time < 0) { 66 if (time < 0) {
@@ -68,7 +68,7 @@ static int seek(int ms, asf_waveformatex_t* wfx)
68 DEBUGF("UKNOWN SEEK ERROR\n"); 68 DEBUGF("UKNOWN SEEK ERROR\n");
69 ci->seek_buffer(ci->id3->first_frame_offset+initial_packet*wfx->packet_size); 69 ci->seek_buffer(ci->id3->first_frame_offset+initial_packet*wfx->packet_size);
70 /*seek failed so return time stamp of the initial packet*/ 70 /*seek failed so return time stamp of the initial packet*/
71 return asf_get_timestamp(&duration, ci); 71 return asf_get_timestamp(&duration);
72 } 72 }
73 73
74 if ((time+duration>=ms && time<=ms) || count > 10) { 74 if ((time+duration>=ms && time<=ms) || count > 10) {
@@ -141,7 +141,7 @@ restart_track:
141 int packet_offset = (resume_offset - ci->id3->first_frame_offset) 141 int packet_offset = (resume_offset - ci->id3->first_frame_offset)
142 % wfx.packet_size; 142 % wfx.packet_size;
143 ci->seek_buffer(resume_offset - packet_offset); 143 ci->seek_buffer(resume_offset - packet_offset);
144 elapsedtime = asf_get_timestamp(&i, ci); 144 elapsedtime = asf_get_timestamp(&i);
145 ci->set_elapsed(elapsedtime); 145 ci->set_elapsed(elapsedtime);
146 } 146 }
147 else 147 else
@@ -190,7 +190,7 @@ restart_track:
190 } 190 }
191 errcount = 0; 191 errcount = 0;
192new_packet: 192new_packet:
193 res = asf_read_packet(&audiobuf, &audiobufsize, &packetlength, &wfx, ci); 193 res = asf_read_packet(&audiobuf, &audiobufsize, &packetlength, &wfx);
194 194
195 if (res < 0) { 195 if (res < 0) {
196 /* We'll try to recover from a parse error a certain number of 196 /* We'll try to recover from a parse error a certain number of