X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=gst-plugins-base-subtitles0.10%2Fdebian%2Fpatches%2F0016-typefinding-workaround-for-hangs-with-ID3-tagged-m4a.patch;fp=gst-plugins-base-subtitles0.10%2Fdebian%2Fpatches%2F0016-typefinding-workaround-for-hangs-with-ID3-tagged-m4a.patch;h=0e124c9d0ae7866cc735e370978c8e1e7ab2ef30;hb=57ba96e291a055f69dbfd4ae9f1ae2390e36986e;hp=0000000000000000000000000000000000000000;hpb=be2c98fb83895d10ac44af7b9a9c3e00ca54bf49;p=mafwsubrenderer diff --git a/gst-plugins-base-subtitles0.10/debian/patches/0016-typefinding-workaround-for-hangs-with-ID3-tagged-m4a.patch b/gst-plugins-base-subtitles0.10/debian/patches/0016-typefinding-workaround-for-hangs-with-ID3-tagged-m4a.patch new file mode 100644 index 0000000..0e124c9 --- /dev/null +++ b/gst-plugins-base-subtitles0.10/debian/patches/0016-typefinding-workaround-for-hangs-with-ID3-tagged-m4a.patch @@ -0,0 +1,29 @@ +From 6ad17ea0835daec54df10f4aaadcd95f597dfa02 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Tue, 6 Oct 2009 10:33:20 +0100 +Subject: [PATCH] typefinding: workaround for hangs with ID3-tagged m4a files + +This works around a race condition in decodebin2/playbin2 in +the most low-risk and least intrusive way possible (NB#134099). +--- + gst/typefind/gsttypefindfunctions.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c +index 2a3a733..a6cfdeb 100644 +--- a/gst/typefind/gsttypefindfunctions.c ++++ b/gst/typefind/gsttypefindfunctions.c +@@ -550,6 +550,13 @@ id3v1_type_find (GstTypeFind * tf, gpointer unused) + guint8 *data = gst_type_find_peek (tf, -128, 3); + + if (data && memcmp (data, "TAG", 3) == 0) { ++ /* HACK: don't typefind as ID3 if this looks like a quicktime/m4a file, ++ * to avoid race condition/bug in decodebin2 that keeps id3demux ! qtdemux ++ * from prerolling at times (Nokia Music Manager creates such files) */ ++ data = gst_type_find_peek (tf, 0, 8); ++ if (data && memcmp (data + 4, "ftyp", 4) == 0) ++ return; ++ + gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, ID3_CAPS); + } + }