[MPlayer-G2-dev] CVS: g2/demux demux_avi.c, 1.3, 1.4 demuxer.h, 1.1.1.1, 1.2

Arpi of Ize syncmail at mplayerhq.hu
Sun Feb 22 01:03:58 CET 2004


CVS change done by Arpi of Ize

Update of /cvsroot/mplayer/g2/demux
In directory mail:/var2/tmp/cvs-serv30290

Modified Files:
	demux_avi.c demuxer.h 
Log Message:
avi_stream_id() moved to the right place


Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/g2/demux/demux_avi.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_avi.c	21 Feb 2004 22:10:52 -0000	1.3
+++ demux_avi.c	22 Feb 2004 00:03:56 -0000	1.4
@@ -41,6 +41,19 @@
 // PTS:  0=interleaved  1=BPS-based
 int pts_from_bps=1;
 
+static inline int avi_stream_id(unsigned int id){
+  unsigned char *p=(unsigned char *)&id;
+  unsigned char a,b;
+#if WORDS_BIGENDIAN
+  a=p[3]-'0'; b=p[2]-'0';
+#else
+  a=p[0]-'0'; b=p[1]-'0';
+#endif
+  if(a>9 || b>9) return 100; // invalid ID
+  return a*10+b;
+}
+
+
 static int demux_avi_read_packet(demuxer_t *demux,demux_stream_t *ds,unsigned int id,unsigned int len,int idxpos,int flags){
   int skip;
   int pts=0;

Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/g2/demux/demuxer.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- demuxer.h	31 Jan 2004 20:16:18 -0000	1.1.1.1
+++ demuxer.h	22 Feb 2004 00:03:56 -0000	1.2
@@ -275,18 +275,6 @@
 // This is defined here because demux_stream_t ins't defined in stream.h
 stream_t* new_ds_stream(demux_stream_t *ds);
 
-static inline int avi_stream_id(unsigned int id){
-  unsigned char *p=(unsigned char *)&id;
-  unsigned char a,b;
-#if WORDS_BIGENDIAN
-  a=p[3]-'0'; b=p[2]-'0';
-#else
-  a=p[0]-'0'; b=p[1]-'0';
-#endif
-  if(a>9 || b>9) return 100; // invalid ID
-  return a*10+b;
-}
-
 //demuxer_t*  new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd);
 
 demuxer_t* demux_open(stream_t *stream,char* name,int flags);




More information about the MPlayer-G2-dev mailing list