[MPlayer-cvslog] CVS: main/libmpdemux demux_nuv.c, 1.11, 1.12 nuppelvideo.h, 1.1, 1.2

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Mar 3 11:19:59 CET 2005


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	demux_nuv.c nuppelvideo.h 
Log Message:
Make nuv files work on bigendian (but old nuv files created with mencoder
wont play anymore - before they would have worked with mplayer on be)


Index: demux_nuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_nuv.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- demux_nuv.c	30 Sep 2002 21:10:41 -0000	1.11
+++ demux_nuv.c	3 Mar 2005 10:19:56 -0000	1.12
@@ -69,6 +69,7 @@
 		{	
 			if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
 				return; /* EOF */
+			le2me_rtframeheader(&rtjpeg_frameheader);
 
 			if ( rtjpeg_frameheader.frametype == 'V' ) 
 			{
@@ -145,6 +146,7 @@
 	demuxer->filepos = orig_pos = stream_tell ( demuxer->stream );
 	if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
 	    return 0; /* EOF */
+	le2me_rtframeheader(&rtjpeg_frameheader);
 
 #if 0
 	printf("NUV frame: frametype: %c, comptype: %c, packetlength: %d\n",
@@ -218,6 +220,7 @@
 	stream_seek(demuxer->stream, 0);
 
 	stream_read ( demuxer->stream, (char*)& rtjpeg_fileheader, sizeof(rtjpeg_fileheader) );
+	le2me_rtfileheader(&rtjpeg_fileheader);
 
 	/* no video */
 	if (rtjpeg_fileheader.videoblocks == 0)

Index: nuppelvideo.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/nuppelvideo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nuppelvideo.h	27 Dec 2001 22:20:15 -0000	1.1
+++ nuppelvideo.h	3 Mar 2005 10:19:56 -0000	1.2
@@ -90,3 +90,23 @@
     unsigned char *buffer_offset;
 } audbuffertyp;
 
+#ifdef WORDS_BIGENDIAN
+#define le2me_rtfileheader(h) {					\
+    (h)->width = le2me_32((h)->width);				\
+    (h)->height = le2me_32((h)->height);			\
+    (h)->desiredwidth = le2me_32((h)->desiredwidth);		\
+    (h)->desiredheight = le2me_32((h)->desiredheight);		\
+    (h)->videoblocks = le2me_32((h)->videoblocks);		\
+    (h)->audioblocks = le2me_32((h)->audioblocks);		\
+    (h)->textsblocks = le2me_32((h)->textsblocks);		\
+    (h)->keyframedist = le2me_32((h)->keyframedist);		\
+  }
+#define le2me_rtframeheader(h) {				\
+    (h)->timecode = le2me_32((h)->timecode);			\
+    (h)->packetlength = le2me_32((h)->packetlength);		\
+  }
+#else
+#define le2me_rtfileheader(h) /**/
+#define le2me_rtframeheader(h) /**/
+#endif
+




More information about the MPlayer-cvslog mailing list