[Bug 727955] id3v2: ignore RVA2 tags with 0 peak bits

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Mar 29 07:14:48 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=727955

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #273976|none                        |needs-work
             status|                            |

--- Comment #1 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 273976
  --> https://bugzilla.gnome.org/attachment.cgi?id=273976
ignore RVA2 tags with out of range peak bits

>Subject: [PATCH] id3v2: ignore RVA2 tags with 0 peak bits
>
>The spec for this does not say nor imply how this should be
>interpreted. One could use 0, 2<31, or reject as invalid.
>This patch does the latter. Same for > 64 bits. The previous
>code would try to shift by 64 bits, which is undefined.
>
>-  if (peak_bits > 64) {
>+  if (peak_bits > 64 || peak_bits == 0) {
>     GST_WARNING ("silly peak precision of %d bits, ignoring", (gint) peak_bits);
>-    peak_bits = 0;
>+    g_free (id);
>+    return FALSE;
>   }

I'm not sure if I agree with this.

A peak_bits value of 0 appears to be valid according to the "spec" ("0 means
that there is no peak volume field"), so we should just ignore the peak stuff
if peak_bits is 0 or >64, and not return FALSE (which means we'll also not add
the gain tag).

The big shift is an issue of course, but maybe should just be skipped if bits
is 0?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list