changeset 7071:acc51ad47911

- functions inside of functions are invalid in icc. replaced with #define's patch by Joey Parrish <joey@yunamusic.com>
author arpi
date Thu, 22 Aug 2002 23:28:08 +0000
parents aaac9080b8a3
children 113d66d78967
files libmpcodecs/ad_vorbis.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_vorbis.c	Thu Aug 22 23:05:58 2002 +0000
+++ b/libmpcodecs/ad_vorbis.c	Thu Aug 22 23:28:08 2002 +0000
@@ -42,11 +42,11 @@
   ogg_packet op;
   vorbis_comment vc;
   struct ov_struct_st *ov;
-  int error(void) {
-    vorbis_comment_clear(&vc);
-    vorbis_info_clear(&ov->vi);
-    free(ov);
-    return 0;
+#define ERROR() { \
+    vorbis_comment_clear(&vc); \
+    vorbis_info_clear(&ov->vi); \
+    free(ov); \
+    return 0; \
   }
   /// Init the decoder with the 3 header packets
   ov = (struct ov_struct_st*)malloc(sizeof(struct ov_struct_st));
@@ -57,20 +57,20 @@
   /// Header
   if(vorbis_synthesis_headerin(&ov->vi,&vc,&op) <0) {
     mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: initial (identification) header broken!\n");
-    return error();
+    ERROR();
   }
   op.bytes = ds_get_packet(sh->ds,&op.packet);
   op.b_o_s  = 0;
   /// Comments
   if(vorbis_synthesis_headerin(&ov->vi,&vc,&op) <0) {
     mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: comment header broken!\n");
-    return error();
+    ERROR();
   }
   op.bytes = ds_get_packet(sh->ds,&op.packet);
   //// Codebook
   if(vorbis_synthesis_headerin(&ov->vi,&vc,&op)<0) {
     mp_msg(MSGT_DECAUDIO,MSGL_WARN,"OggVorbis: codebook header broken!\n");
-    return error();;
+    ERROR();
   } else { /// Print the infos
     char **ptr=vc.user_comments;
     while(*ptr){