Download & Extend

flashvideo_get_size fails if ffmpeg_php is already loaded

Project:FlashVideo
Version:5.x-2.8-rc3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Was working on some custom code making use of the flashvideo_get_size, and this was driving me nuts.

Code was:

if (!extension_loaded($extension)) {
          dl($extension_soname);
         $filepath = getcwd() . '/' . $file->filepath;
         $movie = new ffmpeg_movie($filepath);     // ffmpeg-PHP : used to get video information.
       }

Which never allowed for $movie to be populated if the extension was already loaded. $filepath and $movie just had to be moved outside of the conditional.

Patch also changes this function to take $node->type as an argument rather than the whole $node object for use in function where you don't have access to it.

This is against latest 5.x branch CVS.

Thanks.

AttachmentSize
flashvideo.module.get_size.patch2.18 KB
nobody click here