summaryrefslogtreecommitdiffstats
path: root/filefield_meta
diff options
context:
space:
mode:
authorNathan Haug2009-04-20 22:29:24 +0000
committerNathan Haug2009-04-20 22:29:24 +0000
commit7ae52754ac5d17b500e827701ef455c1a9276430 (patch)
treeabd3774318ab37b6d62907b3580aa573cfbd8552 /filefield_meta
parent89250b08def27892875cd6cc2d770b048966b870 (diff)
Fixing notices when audio track is not MP3 based.
Diffstat (limited to 'filefield_meta')
-rw-r--r--filefield_meta/filefield_meta.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/filefield_meta/filefield_meta.module b/filefield_meta/filefield_meta.module
index f9ca252..f2e60bd 100644
--- a/filefield_meta/filefield_meta.module
+++ b/filefield_meta/filefield_meta.module
@@ -100,8 +100,8 @@ function filefield_meta(&$file) {
$file->data['audio_format'] = $info['audio']['dataformat']; //e.g. mp3
$file->data['audio_sample_rate'] = $info['audio']['sample_rate']; //e.g. 44100
$file->data['audio_channel_mode'] = $info['audio']['channelmode']; // e.g. mono
- $file->data['audio_bitrate'] = $info['audio']['bitrate']; //e.g. 64000
- $file->data['audio_bitrate_mode'] = $info['audio']['bitrate_mode']; //e.g. cbr
+ $file->data['audio_bitrate'] = isset($info['audio']['bitrate']) ? $info['audio']['bitrate'] : NULL; //e.g. 64000
+ $file->data['audio_bitrate_mode'] = isset($info['audio']['bitrate_mode']) ? $info['audio']['bitrate_mode'] : NULL; //e.g. cbr
}
};