Index: ffmpeg_wrapper.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ffmpeg_wrapper/ffmpeg_wrapper.module,v
retrieving revision 1.1.2.20.2.17
diff -r1.1.2.20.2.17 ffmpeg_wrapper.module
334a335
>   // get the kind of files 
336,350c337,343
<   $path_parts = pathinfo($path);
< 
<   // exception handling
<   // WMVs are sometimes asf files
<   if (preg_match('/wmv/i', $path_parts['extension'])) {
<     $exception = 'asf';
<   }
< 
<   if ($file_types) {
<     foreach ($file_types as $file_type) {
<       if ($path_parts['extension']) {
<         if (stristr($file_type, $path_parts['extension']) || stristr($file_type, $exception) ) {
<           return true;
<         }
<       }
---
>   // get the data on this file
>   $file_data = fffmpeg_wrapper_filde_data($path);
>   // some files have multiple formats attached to them
>   foreach(explode(',', $file['video']['codec']) as $type) {
>     // is this type in the array of items that we can decode?
>     if (in_array($type, $file_types)) {
>       return true;
507,511c500,504
< 	static $rates;
< 	if (! $rates) {
< 	  $rates = array(
< 	   'ab'  => array('16k' => '16k', '22k' => '22k', '32k' => '32k', '64k' => t('64k (default)'), '128k' => '128k', '192k' => '192k', '256k' => '256k'),
< 	   'ar' => array('11025' => t('11khz'), '22050' => t('22khz'), '32000' => t('32khz'), '44100' => t('44.1khz (default)') ),
---
>   static $rates;
>   if (! $rates) {
>     $rates = array(
>      'ab'  => array('16k' => '16k', '22k' => '22k', '32k' => '32k', '64k' => t('64k (default)'), '128k' => '128k', '192k' => '192k', '256k' => '256k'),
>      'ar' => array('11025' => t('11khz'), '22050' => t('22khz'), '32000' => t('32khz'), '44100' => t('44.1khz (default)') ),
515,516c508,509
< 	}
< 	return $rates[$type];
---
>   }
>   return $rates[$type];
551,553c544,546
< function ffmpeg_wrapper_get_file_formats($ret = null) {
<   $cache_id = 'ffmpeg_wrapper_file_formats';
<   $cache = cache_get($cache_id, 'cache');
---
> function ffmpeg_wrapper_get_file_formats($ret = 'row') {
>   //$cache_id = 'ffmpeg_wrapper_file_formats';
>  // $cache = cache_get($cache_id, 'cache');
567,568d559
<     $formats = explode("\n", $formats);
< 
573c564
<     foreach ($formats as $format) {
---
>     foreach (explode("\n", $formats) as $format) {
583c574,578
<         $decode_formats[] = $a_format['type'];
---
>         // we can have multiple types per format
>         $types = explode(',', $a_format['name']);
>         foreach ($types as $type) {
>           $decode_formats[] = $a_format['type'];
>         }
591c586,590
<         $encode_formats[] = $a_format['type'];
---
>         // we can have multiple types per format
>         $types = explode(',', $a_format['name']);
>         foreach ($types as $type) {
>           $encode_formats[] = $a_format['type'];
>         }
601a601
>     
611c611
< 
---
>   
794c794
<   	preg_match($error, $ffmpeg_object->output, $matches);
---
>     preg_match($error, $ffmpeg_object->output, $matches);
921c921
< 	 )), 'setting');
---
>    )), 'setting');
