[Bug 773172] typefinding: mis-detects iTunes artwork cache ( .itc ) file as audio/mpeg
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Nov 17 01:05:38 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=773172
Tim-Philipp Müller <t.i.m at zen.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #340089|none |reviewed
status| |
--- Comment #6 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 340089
--> https://bugzilla.gnome.org/attachment.cgi?id=340089
add typefinder for Apple/iTunes itc artwork files
Thanks for working on this.
>+/*** application/itc ***/
>+static GstStaticCaps itc_caps = GST_STATIC_CAPS ("application/itc");
>+#define ITC_CAPS (gst_static_caps_get(&itc_caps))
OOC, is this a media type that is used elsewhere, or made-up?
>+ /* take 1x magic at start as a good hint */
>+ if (!memcmp (c.data, magic, 8)) {
>+ itc_prob = GST_TYPE_FIND_MAXIMUM - 3;
>+ data_scan_ctx_advance (tf, &c, 8);
>+ } else
>+ goto done;
I think it'd be nicer to read if it was reflowed as
if (memcmp () != 0)
return;
...
What is the meaning of these 'preamble' bytes? Do they always exist once,
twice, three times? (and in a row?)
My gut feeling is that the probability advertised here is a bit too high for
the kind of data checked.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the gstreamer-bugs
mailing list