[MPlayer-cvslog] CVS: main/libmpdemux demux_avi.c,1.64,1.65

Roberto Togni CVS syncmail at mplayerhq.hu
Sat Aug 13 14:20:09 CEST 2005


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv29445

Modified Files:
	demux_avi.c 
Log Message:
100l: fix avi demuxing for ni and nini cases, allow forcing ni and nini 
demuxers


Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- demux_avi.c	11 Aug 2005 17:23:45 -0000	1.64
+++ demux_avi.c	13 Aug 2005 12:20:07 -0000	1.65
@@ -17,6 +17,9 @@
 extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);
 extern int demux_ogg_open(demuxer_t* demuxer);
 
+extern demuxer_desc_t demuxer_desc_avi_ni;
+extern demuxer_desc_t demuxer_desc_avi_nini;
+
 // PTS:  0=interleaved  1=BPS-based
 int pts_from_bps=1;
 
@@ -271,10 +274,12 @@
 	if(priv->idx_size>0){
 	    // has index
 	    demux->type=DEMUXER_TYPE_AVI_NI;
+	    demux->desc=&demuxer_desc_avi_ni;
 	    --priv->idx_pos; // hack
 	} else {
 	    // no index
 	    demux->type=DEMUXER_TYPE_AVI_NINI;
+	    demux->desc=&demuxer_desc_avi_nini;
 	    priv->idx_pos=demux->filepos; // hack
 	}
 	priv->idx_pos_v=priv->idx_pos_a=priv->idx_pos;
@@ -522,6 +527,7 @@
         if(force_ni || abs(a_pos-v_pos)>0x100000){  // distance > 1MB
           mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected);
           demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!!
+          demuxer->desc=&demuxer_desc_avi_ni; // HACK!!!!
 	  pts_from_bps=1; // force BPS sync!
         }
       }
@@ -530,6 +536,7 @@
       if(force_ni){
           mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI);
           demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!!
+          demuxer->desc=&demuxer_desc_avi_nini; // HACK!!!!
 	  priv->idx_pos_a=
 	  priv->idx_pos_v=demuxer->movi_start;
 	  pts_from_bps=1; // force BPS sync!
@@ -926,3 +933,35 @@
   demux_seek_avi,
   demux_avi_control
 };
+
+demuxer_desc_t demuxer_desc_avi_ni = {
+  "AVI demuxer, non-interleaved",
+  "avini",
+  "AVI",
+  "Arpi?",
+  "AVI files, including non interleaved files",
+  DEMUXER_TYPE_AVI,
+  1, // safe autodetect
+  avi_check_file,
+  demux_avi_fill_buffer_ni,
+  demux_open_hack_avi,
+  demux_close_avi,
+  demux_seek_avi,
+  demux_avi_control
+};
+
+demuxer_desc_t demuxer_desc_avi_nini = {
+  "AVI demuxer, non-interleaved and no index",
+  "avinini",
+  "AVI",
+  "Arpi?",
+  "AVI files, including non interleaved files",
+  DEMUXER_TYPE_AVI,
+  1, // safe autodetect
+  avi_check_file,
+  demux_avi_fill_buffer_nini,
+  demux_open_hack_avi,
+  demux_close_avi,
+  demux_seek_avi,
+  demux_avi_control
+};




More information about the MPlayer-cvslog mailing list