--- flashvideo.module1.20.2.39	2009-02-09 17:09:10.000000000 -0500
+++ flashvideo.module1.20.2.39.patched	2009-02-09 17:09:10.000000000 -0500
@@ -1426,8 +1426,8 @@ function flashvideo_import($path) {
    }
 }
 
-function flashvideo_get_size($node, $file = NULL) {
-   if($file && flashvideo_variable_get($node->type, 'ffmpegphp', 0)) {
+function flashvideo_get_size($node_type, $file = NULL) {
+   if($file && flashvideo_variable_get($node_type, 'ffmpegphp', 0)) {
       $extension = "ffmpeg";
       $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
       $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
@@ -1435,9 +1435,11 @@ function flashvideo_get_size($node, $fil
       // load extension
       if (!extension_loaded($extension)) {
          dl($extension_soname);
-         $filepath = getcwd() . '/' . $file->filepath;
-         $movie = new ffmpeg_movie($filepath);     // ffmpeg-PHP : used to get video information.
       }
+      
+      $filepath = getcwd() . '/' . $file->filepath;
+      $movie = new ffmpeg_movie($filepath);     // ffmpeg-PHP : used to get video information.
+   
    }
                      
    if($file && $movie) {
@@ -1480,7 +1482,7 @@ function _flashvideo_update_files($node)
             $extension = _flashvideo_get_filetype($file->filepath);
             if(_flashvideo_get_mime_type($extension, TRUE)) {  // Only add if the file is a video and is not already in our flashvideo table.
                if(!$found) {
-                  $size = flashvideo_get_size($node, $file);
+                  $size = flashvideo_get_size($node->type, $file);
                   
                   // Rename the original file.
                   $filepath = substr( $file->filepath, 0, (strrpos($file->filepath, '/') + 1) );
@@ -1828,7 +1830,7 @@ function flashvideo_get_video_object( $n
    	}
    	else {																														// We will just want to use the defaults if none was provided.
    		$node->type = $video['nodetype'];   
-      	$size = flashvideo_get_size($node);
+      	$size = flashvideo_get_size($node->type);
       	$video['width'] = $size['width'];
       	$video['height'] = $size['height']; 
       }  
