[banshee] GStreamerSharp: Fix crash when ripping to non-MP3 formats
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] GStreamerSharp: Fix crash when ripping to non-MP3 formats
- Date: Sun, 5 Jan 2014 15:03:40 +0000 (UTC)
commit 61f8eb71bf4e982495b49df28fc3b1eaf73b0d0a
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sun Jan 5 16:01:00 2014 +0100
GStreamerSharp: Fix crash when ripping to non-MP3 formats
Only get the value of the "mpegversion" field is we're dealing with an
MPEG file. This prevents an NRE because that field is not present.
.../Banshee.GStreamerSharp/AudioCdRipper.cs | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/AudioCdRipper.cs
b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/AudioCdRipper.cs
index ea4c222..47be850 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/AudioCdRipper.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/AudioCdRipper.cs
@@ -313,10 +313,9 @@ namespace Banshee.GStreamerSharp
string mimetype = str.Name;
int mpeg_layer;
- GLib.Value val = str.GetValue ("mpegversion");
-
// Prefer and adjust audio/mpeg, leaving MP3 as audio/mpeg
if (mimetype.StartsWith ("audio/mpeg")) {
+ GLib.Value val = str.GetValue ("mpegversion");
mpeg_layer = (Int32)val.Val;
switch (mpeg_layer) {
case 2: mimetype = "audio/mp2"; break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]