--- sites/all/modules/videofield/common.inc.orig	2011-01-18 16:40:08.000000000 +0600
+++ sites/all/modules/videofield/common.inc	2011-05-03 02:09:53.000000000 +0700
@@ -16,40 +16,53 @@ function _video_field_common_get_player(
   
   switch ($op) {
     case 'divx':
-      return theme('videofield_play_divx', $element);
+      $output = theme('videofield_play_divx', $element); break;
     case 'mov':
     case '3gp':
     case '3g2':
-      return theme('videofield_play_quicktime', $element);
+      $output = theme('videofield_play_quicktime', $element); break;
     case 'mp4': // video/mp4
-    	$player=variable_get('videofield_mp4_player', 0);
-    	if($player){
-    	 return theme('videofield_play_flash', $element);
-    	}
-    	else
-         return theme('videofield_play_quicktime', $element);
+      $player = variable_get('videofield_mp4_player', 0);
+      if ($player) {
+        $output = theme('videofield_play_flash', $element);
+      } else
+        $output = theme('videofield_play_quicktime', $element);
+      break;
     case 'rm':
-      return theme('videofield_play_realmedia', $element);
+      $output = theme('videofield_play_realmedia', $element); break;
     case 'f4v':
     case 'flv':
-      return theme('videofield_play_flash', $element);
+      $output = theme('videofield_play_flash', $element); break;
     case 'swf':
-      return theme('videofield_play_swf', $element);
+      $output = theme('videofield_play_swf', $element); break;
     case 'dir':
     case 'dcr':
-      return theme('videofield_play_dcr', $element);
+      $output = theme('videofield_play_dcr', $element); break;
     case 'asf':
     case 'wmv':
     case 'avi':
     case 'mpg':
     case 'mpeg':
-     return theme('videofield_play_windowsmedia', $element);
+      $output = theme('videofield_play_windowsmedia', $element); break;
     case 'ogg':
-      return theme('videofield_play_ogg_theora', $element);
+      $output = theme('videofield_play_ogg_theora', $element); break;
     default:
       drupal_set_message('No video player for ' .$op, 'error');
-      break;
+      return;
   }
+  if (!empty($element['#item']['data']['description'])) {
+    $output .= '<div class="video-description">' . $element['#item']['data']['description'].'</div>';
+  }
+  
+  //If user is file owner check for download permission and display download link
+  if ($user->uid==$element['#item']['uid'] && user_access('download own video files')) {
+    $output .= '<div class="video-download"><b>Download:</b>' . theme('filefield_file', $element['#item']) . '</div>';
+  }
+  elseif (user_access('download all video files')) {
+    //If user has permission to download all video files, then display download link
+    $output .= '<div class="video-download"><b>Download:</b>' . theme('filefield_file', $element['#item']) . '</div>';
+  }
+  return $output;
 }
 
 /**
