summaryrefslogtreecommitdiff
path: root/apps/codecs/libwmapro/wmaprodec.c
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-04-30 12:20:25 +0000
committerMohamed Tarek <mt@rockbox.org>2010-04-30 12:20:25 +0000
commitfe147cec651486d39967f24d0d1bbe6ae1cd067b (patch)
treeef15055d39c17e05c91f591b5d4f264bfd421e5e /apps/codecs/libwmapro/wmaprodec.c
parentcf43e5083b9e0f87de262ea31fd8067225ebfcda (diff)
downloadrockbox-fe147cec651486d39967f24d0d1bbe6ae1cd067b.zip
rockbox-fe147cec651486d39967f24d0d1bbe6ae1cd067b.tar.gz
rockbox-fe147cec651486d39967f24d0d1bbe6ae1cd067b.tar.bz2
rockbox-fe147cec651486d39967f24d0d1bbe6ae1cd067b.tar.xz
Modify the ffmpeg source files in apps/codecs/libwmapro in order to compile the codec standalone.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25764 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwmapro/wmaprodec.c')
-rw-r--r--apps/codecs/libwmapro/wmaprodec.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c
index 82f1b36..88d317d 100644
--- a/apps/codecs/libwmapro/wmaprodec.c
+++ b/apps/codecs/libwmapro/wmaprodec.c
@@ -94,6 +94,14 @@
#include "dsputil.h"
#include "wma.h"
+/* Some defines to make it compile */
+#define AVERROR_INVALIDDATA -1
+#define AVERROR_PATCHWELCOME -2
+#ifndef M_PI
+#define M_PI 3.14159265358979323846 /* pi */
+#endif
+#define av_log_ask_for_sample(...)
+
/** current decoder limitations */
#define WMAPRO_MAX_CHANNELS 8 ///< max number of handled channels
#define MAX_SUBFRAMES 32 ///< max number of subframes per channel
@@ -444,9 +452,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
/** calculate sine values for the decorrelation matrix */
for (i = 0; i < 33; i++)
sin64[i] = sin(i*M_PI / 64.0);
-
+#if 0
if (avctx->debug & FF_DEBUG_BITSTREAM)
dump_context(s);
+#endif
avctx->channel_layout = channel_mask;
return 0;
@@ -1559,7 +1568,7 @@ static void flush(AVCodecContext *avctx)
s->packet_loss = 1;
}
-
+#if 0
/**
*@brief wmapro decoder
*/
@@ -1576,3 +1585,10 @@ AVCodec wmapro_decoder = {
.flush= flush,
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
};
+#endif
+
+int main(void)
+{
+ /* possible test program - just here now to ensure linking is done properly */
+ return 0;
+}