[rhythmbox] track-transfer-batch: fix is-lossless checks for the 'copy' profile



commit abb289cfc5a5f0b1379235c9ac3860b8e128f4ba
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Aug 20 10:02:20 2015 +1000

    track-transfer-batch: fix is-lossless checks for the 'copy' profile
    
    The copy profile has no media type, so check the source media type instead.

 shell/rb-track-transfer-batch.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/shell/rb-track-transfer-batch.c b/shell/rb-track-transfer-batch.c
index 06cc0a5..d068bdf 100644
--- a/shell/rb-track-transfer-batch.c
+++ b/shell/rb-track-transfer-batch.c
@@ -212,7 +212,6 @@ select_profile_for_entry (RBTrackTransferBatch *batch, RhythmDBEntry *entry, Gst
                }
 
                is_missing = (g_list_find (batch->priv->missing_plugin_profiles, profile) != NULL);
-               is_lossless = (rb_gst_media_type_is_lossless (profile_media_type));
                if (g_str_has_prefix (source_media_type, "audio/x-raw") == FALSE) {
                        is_source = rb_gst_media_type_matches_profile (profile, source_media_type);
                } else {
@@ -220,6 +219,12 @@ select_profile_for_entry (RBTrackTransferBatch *batch, RhythmDBEntry *entry, Gst
                        is_source = FALSE;
                }
 
+               if (profile_media_type != NULL) {
+                       is_lossless = (rb_gst_media_type_is_lossless (profile_media_type));
+               } else {
+                       is_lossless = (rb_gst_media_type_is_lossless (source_media_type));
+               }
+
                if (is_missing && allow_missing == FALSE && is_source == FALSE) {
                        /* this only applies if transcoding would be required */
                        rb_debug ("can't use encoding %s due to missing plugins", profile_media_type);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]