--- gst-libs/ext/ffmpeg/libavformat/mov.orig	Tue Sep 14 23:11:58 2004
+++ gst-libs/ext/ffmpeg/libavformat/mov.c	Tue Sep 14 23:27:26 2004
@@ -997,6 +997,7 @@
             }
             else if( st->codec.codec_tag == MKTAG( 'm', 'p', '4', 'a' ))
             {
+                MOV_atom_t a;
                 /* Handle mp4 audio tag */
                 get_be32(pb); /* version */
                 get_be32(pb);
@@ -1006,7 +1007,9 @@
                 st->codec.sample_rate = get_be16(pb); /* sample rate, not always correct */
                 get_be16(pb);
                 c->mp4=1;
-                MOV_atom_t a = { format, url_ftell(pb), size - (20 + 20 + 8) };
+                a.type = format;
+		a.offset = url_ftell(pb);
+		a.size =  size - (20 + 20 + 8);
                 mov_read_default(c, pb, a);
                 /* Get correct sample rate from extradata */
                 if(st->codec.extradata_size) {
@@ -1023,10 +1026,11 @@
             }
 	    else if(size>=(16+20))
 	    {//16 bytes read, reading atleast 20 more
+                uint16_t version;
 #ifdef DEBUG
                 printf("audio size=0x%X\n",size);
 #endif
-                uint16_t version = get_be16(pb); /* version */
+		version = get_be16(pb); /* version */
                 get_be16(pb); /* revision level */
                 get_be32(pb); /* vendor */
 
@@ -1066,14 +1070,14 @@
                     if(size>(16+20+16))
                     {
                         //Optional, additional atom-based fields
+                        MOV_atom_t a = { format, url_ftell(pb), size - (16 + 20 + 16 + 8) };
 #ifdef DEBUG
-                        printf("offest=0x%X, sizeleft=%d=0x%x,format=%c%c%c%c\n",(int)url_ftell(pb),size - (16 + 20 + 16 ),size - (16 + 20 + 16 ),
+                        printf("offset=0x%X, sizeleft=%d=0x%x,format=%c%c%c%c\n",(int)a.offset,size - (16 + 20 + 16 ),size - (16 + 20 + 16 ),
                             (format >> 0) & 0xff,
                             (format >> 8) & 0xff,
                             (format >> 16) & 0xff,
                             (format >> 24) & 0xff);
 #endif
-                        MOV_atom_t a = { format, url_ftell(pb), size - (16 + 20 + 16 + 8) };
                         mov_read_default(c, pb, a);
                     }
                 }
