[Gridflow-cvs] [svn] commit: r3802 - in /trunk/format: mpeg3.c quicktimehw.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Wed Jun 4 17:56:12 EDT 2008


Author: matju
Date: Wed Jun  4 17:56:11 2008
New Revision: 3802

Log:
fix previous commit (about seek)

Modified:
    trunk/format/mpeg3.c
    trunk/format/quicktimehw.c

Modified: trunk/format/mpeg3.c
==============================================================================
--- trunk/format/mpeg3.c (original)
+++ trunk/format/mpeg3.c Wed Jun  4 17:56:11 2008
@@ -45,13 +45,13 @@
 	#endif
 		if (!mpeg) RAISE("IO Error: can't open file `%s': %s", filename.data(), strerror(errno));
 	}
-	\decl 0 seek (int frame);
+	\decl 0 seek (long frame);
 	\decl 0 rewind ();
 	\decl 0 bang ();
 };
 
-\def 0 seek (int frame) {
-	mpeg3_set_frame(mpeg,clip(frame,0,mpeg3_video_frames(mpeg,track)-1),track);
+\def 0 seek (long frame) {
+	mpeg3_set_frame(mpeg,clip(frame,0L,mpeg3_video_frames(mpeg,track)-1),track);
 }
 \def 0 rewind () {_0_seek(0,0,0);}
 

Modified: trunk/format/quicktimehw.c
==============================================================================
--- trunk/format/quicktimehw.c (original)
+++ trunk/format/quicktimehw.c Wed Jun  4 17:56:11 2008
@@ -73,7 +73,7 @@
 		bit_packing = new BitPacking(is_le(),3,3,mask);
 	}
 	\decl 0 bang ();
-	\decl 0 seek (int frame);
+	\decl 0 seek (long frame);
 	\decl 0 rewind ();
 	\decl 0 force_size (int32 height, int32 width);
 	\decl 0 codec (string c);
@@ -86,13 +86,14 @@
 };
 
 \def 0 force_size (int32 height, int32 width) { force = new Dim(height, width); }
-\def 0 seek (int frame) {
-	quicktime_set_video_position(anim,clip(frame,0,quicktime_video_length(anim,track)-1,track);
+\def 0 seek (long frame) {
+	quicktime_set_video_position(anim,clip(frame,0L,quicktime_video_length(anim,track)-1),track);
 }
 \def 0 rewind () {_0_seek(0,0,0);}
 
 \def 0 bang () {
-	int nframe = quicktime_video_position(anim,track);
+	long length = quicktime_video_length(anim,track);
+	long nframe = quicktime_video_position(anim,track);
 	if (nframe >= length) {outlet_bang(bself->te_outlet); return;}
 	/* if it works, only do it once, to avoid silly stderr messages forgotten in LQT */
 	if (!quicktime_reads_cmodel(anim,colorspace,0) && !started) {



More information about the Gridflow-cvs mailing list