[Ffmpeg-cvslog] r6744 - in trunk/libavformat: aviobuf.c mov.c

michael subversion
Fri Oct 20 11:32:50 CEST 2006


Author: michael
Date: Fri Oct 20 11:32:48 2006
New Revision: 6744

Modified:
   trunk/libavformat/aviobuf.c
   trunk/libavformat/mov.c

Log:
move memory reading ByteIOContext init from mov.c to avobuf.c 


Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c	(original)
+++ trunk/libavformat/aviobuf.c	Fri Oct 20 11:32:48 2006
@@ -54,6 +54,10 @@
     s->is_streamed = 0;
     s->max_packet_size = 0;
     s->update_checksum= NULL;
+    if(!read_packet && !write_flag){
+        s->pos = buffer_size;
+        s->buf_end = s->buffer + buffer_size;
+    }
     return 0;
 }
 

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Fri Oct 20 11:32:48 2006
@@ -1346,11 +1346,6 @@
 
 
 #ifdef CONFIG_ZLIB
-static int null_read_packet(void *opaque, uint8_t *buf, int buf_size)
-{
-    return buf_size;
-}
-
 static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 {
     ByteIOContext ctx;
@@ -1383,7 +1378,7 @@
     get_buffer(pb, cmov_data, cmov_len);
     if(uncompress (moov_data, (uLongf *) &moov_len, (const Bytef *)cmov_data, cmov_len) != Z_OK)
         return -1;
-    if(init_put_byte(&ctx, moov_data, moov_len, 0, NULL, null_read_packet, NULL, NULL) != 0)
+    if(init_put_byte(&ctx, moov_data, moov_len, 0, NULL, NULL, NULL, NULL) != 0)
         return -1;
     atom.type = MKTAG( 'm', 'o', 'o', 'v' );
     atom.offset = 0;




More information about the ffmpeg-cvslog mailing list