# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/video/transcoders/video_ffmpeg.inc
--- contributions/modules/video/transcoders/video_ffmpeg.inc Base (1.1.2.34)
+++ contributions/modules/video/transcoders/video_ffmpeg.inc Locally Modified (Based On 1.1.2.34)
@@ -401,12 +401,17 @@
     if (!$this->load_job($video->fid))
       return;
     //lets get all our videos and unlink them
-    $sql = db_query("SELECT filepath FROM {video_files} WHERE fid=%d", $video->fid);
+    $sql = db_query("SELECT data FROM {video_files} WHERE fid=%d", $video->fid);
     //we loop here as future development will include multiple video types (HTML 5)
     while ($row = db_fetch_object($sql)) {
-      if (file_exists($row->filepath))
-        unlink($row->filepath);
+      $data = unserialize($row->data);
+      if (empty($data))
+        continue;
+      foreach ($data as $file) {
+        if (file_exists($file->filepath))
+          unlink($file->filepath);
     }
+    }
     //now delete our rows.
     db_query('DELETE FROM {video_files} WHERE fid = %d', $video->fid);
   }
