[tracker/tracker-0.10] tracker-extract, gstreamer: On _DECRYPT errors, keep on reading tags



commit 28409cc73cf509ff0da0bbf75ed8545ffd61d6eb
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Feb 24 16:19:08 2011 +0100

    tracker-extract,gstreamer: On _DECRYPT errors, keep on reading tags
    
    Fixes NB#230255

 src/tracker-extract/tracker-extract-gstreamer.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 958b372..3b66086 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -527,6 +527,10 @@ extract_metadata (MetadataExtractor      *extractor,
 			gst_tag_list_get_string (extractor->tagcache, GST_TAG_VIDEO_CODEC, &video_codec);
 			gst_tag_list_get_string (extractor->tagcache, GST_TAG_AUDIO_CODEC, &audio_codec);
 
+			g_debug ("Reading codecs from the stream... audio: '%s', video: '%s'",
+			         audio_codec ? audio_codec : "none",
+			         video_codec ? video_codec : "none");
+
 			if (audio_codec && !video_codec) {
 				extractor->mime = EXTRACT_MIME_AUDIO;
 			} else {
@@ -1117,12 +1121,9 @@ poll_for_ready (MetadataExtractor *extractor,
 					g_free (error_debug_message);
 					g_error_free (lerror);
 
-					/* According to GStreamer guys we shouldn't keep on trying
-					 * to read tags when a _DECRYPT error is received. In this
-					 * case, we should consider all tags read up to the point
-					 * when we received the encryption error. */
-					gst_message_unref (message);
-					return TRUE;
+					/* We really need to keep on reading as tags may come
+					 * afterwards, like codec tags in DRM-ed files. */
+					break;
 				}
 			}
 #endif



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