[MPlayer-cvslog] r38651 - trunk/libmpdemux/muxer_avi.c

cigaes subversion at mplayerhq.hu
Sat Sep 21 12:30:10 EEST 2024


Author: cigaes
Date: Sat Sep 21 12:30:09 2024
New Revision: 38651

Log:
libmpdemux/muxer_avi: explicit pointer casts

Recent compilers consider implicit casts an error.

Modified:
   trunk/libmpdemux/muxer_avi.c

Modified: trunk/libmpdemux/muxer_avi.c
==============================================================================
--- trunk/libmpdemux/muxer_avi.c	Sat Sep 21 12:30:09 2024	(r38650)
+++ trunk/libmpdemux/muxer_avi.c	Sat Sep 21 12:30:09 2024	(r38651)
@@ -142,8 +142,8 @@ static muxer_stream_t* avifile_new_strea
 static void write_avi_chunk(stream_t *stream,unsigned int id,int len,void* data){
  int le_len = le2me_32(len);
  int le_id = le2me_32(id);
- stream_write_buffer(stream, &le_id, 4);
- stream_write_buffer(stream, &le_len, 4);
+ stream_write_buffer(stream, (unsigned char *)&le_id, 4);
+ stream_write_buffer(stream, (unsigned char *)&le_len, 4);
 
 if(len>0){
   if(data){
@@ -176,9 +176,9 @@ static void write_avi_list(stream_t *str
   list_id = le2me_32(list_id);
   le_len  = le2me_32(len);
   le_id   = le2me_32(id);
-  stream_write_buffer(stream, &list_id, 4);
-  stream_write_buffer(stream, &le_len, 4);
-  stream_write_buffer(stream, &le_id, 4);
+  stream_write_buffer(stream, (unsigned char *)&list_id, 4);
+  stream_write_buffer(stream, (unsigned char *)&le_len, 4);
+  stream_write_buffer(stream, (unsigned char *)&le_id, 4);
 }
 
 static void avifile_odml_new_riff(muxer_t *muxer)
@@ -199,7 +199,7 @@ static void avifile_odml_new_riff(muxer_
     riff[0]=le2me_32(mmioFOURCC('R','I','F','F'));
     riff[1]=0;
     riff[2]=le2me_32(mmioFOURCC('A','V','I','X'));
-    stream_write_buffer(muxer->stream, riff, 12);
+    stream_write_buffer(muxer->stream, (unsigned char *)riff, 12);
 
     write_avi_list(muxer->stream,listtypeAVIMOVIE,0);
 
@@ -251,12 +251,12 @@ static void avifile_write_header(muxer_t
           movilen = le2me_32(rifflen - 12);
           rifflen = le2me_32(rifflen);
           stream_seek(muxer->stream, vsi->riffofs[i]+4);
-          stream_write_buffer(muxer->stream,&rifflen,4);
+          stream_write_buffer(muxer->stream,(unsigned char *)&rifflen,4);
 
           /* fixup movi length */
           if (i > 0) {
               stream_seek(muxer->stream, vsi->riffofs[i]+16);
-              stream_write_buffer(muxer->stream,&movilen,4);
+              stream_write_buffer(muxer->stream,(unsigned char *)&movilen,4);
           }
       }
 
@@ -269,7 +269,7 @@ static void avifile_write_header(muxer_t
     riff[0]=le2me_32(riff[0]);
     riff[1]=le2me_32(riff[1]);
     riff[2]=le2me_32(riff[2]);
-    stream_write_buffer(muxer->stream,&riff,12);
+    stream_write_buffer(muxer->stream,(unsigned char *)&riff,12);
   }
 
   // update AVI header:
@@ -406,7 +406,7 @@ static void avifile_write_header(muxer_t
 	  idxhdr[6] = 0;
 	  idxhdr[7] = 0;
 
-	  stream_write_buffer(muxer->stream,idxhdr,sizeof(idxhdr));
+	  stream_write_buffer(muxer->stream,(unsigned char *)idxhdr,sizeof(idxhdr));
 	  for (j=0; j<n; j++) {
 	      struct avi_odmlsuperidx_entry *entry = &si->superidx[j];
 	      unsigned int data[4];
@@ -414,7 +414,7 @@ static void avifile_write_header(muxer_t
 	      data[1] = le2me_32(entry->ofs >> 32);
 	      data[2] = le2me_32(entry->len);
 	      data[3] = le2me_32(entry->duration);
-	      stream_write_buffer(muxer->stream,data,sizeof(data));
+	      stream_write_buffer(muxer->stream,(unsigned char *)data,sizeof(data));
 	  }
       }
   }
@@ -642,13 +642,13 @@ static void avifile_odml_write_index(mux
 	si->superidx[j].ofs = stream_tell(muxer->stream);
 	si->superidx[j].duration = duration;
 
-	stream_write_buffer(muxer->stream, idxhdr,sizeof(idxhdr));
+	stream_write_buffer(muxer->stream, (unsigned char *)idxhdr,sizeof(idxhdr));
 	for (k=0; k<entries_per_subidx && idxpos<si->idxpos; k++) {
 	    unsigned int entry[2];
 	    entry[0] = le2me_32(si->idx[idxpos].ofs - start);
 	    entry[1] = le2me_32(si->idx[idxpos].len | si->idx[idxpos].flags);
 	    idxpos++;
-	    stream_write_buffer(muxer->stream, entry, sizeof(entry));
+	    stream_write_buffer(muxer->stream, (unsigned char *)entry, sizeof(entry));
 	}
      }
   }


More information about the MPlayer-cvslog mailing list