changeset 142:5ce1d36e9ff5 trunk

[svn] Don't build wma by default, it's not working.
author nenolod
date Thu, 10 Nov 2005 15:56:32 -0800
parents 4bc48a929b74
children 32c320bba8a6
files Plugins/Input/Makefile.am Plugins/Input/wma/libffwma/asf.c Plugins/Input/wma/libffwma/futils.c Plugins/Input/wma/libffwma/parser.c Plugins/Input/wma/libffwma/utils.c
diffstat 5 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/Makefile.am	Thu Nov 10 15:15:54 2005 -0800
+++ b/Plugins/Input/Makefile.am	Thu Nov 10 15:56:32 2005 -0800
@@ -1,2 +1,2 @@
-ALL_PLUGINS = mpg123 aac mikmod vorbis tonegen cdaudio wav flac console wma
+ALL_PLUGINS = mpg123 aac mikmod vorbis tonegen cdaudio wav flac console
 SUBDIRS = $(INPUT_PLUGINS)
--- a/Plugins/Input/wma/libffwma/asf.c	Thu Nov 10 15:15:54 2005 -0800
+++ b/Plugins/Input/wma/libffwma/asf.c	Thu Nov 10 15:56:32 2005 -0800
@@ -500,7 +500,7 @@
                         value_len = get_le16(pb);
                         if ((value_type == 0) || (value_type == 1)) // unicode or byte
                         {
-                                value = (char *)av_mallocz(value_len);
+                                value = (char *)malloc(value_len);
                                 get_str16_nolen(pb, value_len, value, value_len);
                                 if (strcmp(name,"WM/AlbumTitle")==0) { strcpy(s->album, value); }
                                 if (strcmp(name,"WM/Genre")==0) { strcpy(s->genre, value); }
--- a/Plugins/Input/wma/libffwma/futils.c	Thu Nov 10 15:15:54 2005 -0800
+++ b/Plugins/Input/wma/libffwma/futils.c	Thu Nov 10 15:56:32 2005 -0800
@@ -1497,6 +1497,11 @@
     if (s->nb_streams >= MAX_STREAMS)
         return NULL;
 
+#if 0
+    /* we shouldn't have to do this but ffmpeg sucks --nenolod */
+    *s->streams = malloc(sizeof(AVStream *) * s->nb_streams);
+#endif
+
     st = malloc(sizeof(AVStream));
     if (!st)
         return NULL;
@@ -1509,7 +1514,8 @@
     st->id = id;
     st->start_time = AV_NOPTS_VALUE;
     st->duration = AV_NOPTS_VALUE;
-    s->streams[s->nb_streams++] = st;
+    s->streams[st->index] = st;
+    s->nb_streams++;	// WTF?
     return st;
 }
 
--- a/Plugins/Input/wma/libffwma/parser.c	Thu Nov 10 15:15:54 2005 -0800
+++ b/Plugins/Input/wma/libffwma/parser.c	Thu Nov 10 15:56:32 2005 -0800
@@ -41,11 +41,11 @@
     }
     return NULL;
  found:
-    s = av_mallocz(sizeof(AVCodecParserContext));
+    s = malloc(sizeof(AVCodecParserContext));
     if (!s)
         return NULL;
     s->parser = parser;
-    s->priv_data = av_mallocz(parser->priv_data_size);
+    s->priv_data = malloc(parser->priv_data_size);
     if (!s->priv_data) {
         free(s);
         return NULL;
--- a/Plugins/Input/wma/libffwma/utils.c	Thu Nov 10 15:15:54 2005 -0800
+++ b/Plugins/Input/wma/libffwma/utils.c	Thu Nov 10 15:56:32 2005 -0800
@@ -221,7 +221,7 @@
  * this can be deallocated by simply calling free() 
  */
 AVCodecContext *avcodec_alloc_context(void){
-    AVCodecContext *avctx= av_mallocz(sizeof(AVCodecContext));
+    AVCodecContext *avctx= malloc(sizeof(AVCodecContext));
     
     if(avctx==NULL) return NULL;
     
@@ -235,7 +235,7 @@
  * this can be deallocated by simply calling free() 
  */
 AVFrame *avcodec_alloc_frame(void){
-    AVFrame *pic= av_mallocz(sizeof(AVFrame));
+    AVFrame *pic= malloc(sizeof(AVFrame));
     
     return pic;
 }
@@ -251,7 +251,7 @@
     avctx->codec_id = codec->id;
     avctx->frame_number = 0;
     if (codec->priv_data_size > 0) {
-        avctx->priv_data = av_mallocz(codec->priv_data_size);
+        avctx->priv_data = malloc(codec->priv_data_size);
         if (!avctx->priv_data) 
             return -ENOMEM;
     } else {