[Bug 738538] Add demuxer/parser for Apple's Core Audio Format (CAF)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 9 13:48:41 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=738538
  GStreamer | gst-plugins-bad | git

--- Comment #14 from Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> 2015-01-09 21:48:38 UTC ---
Review of attachment 293196:
 --> (https://bugzilla.gnome.org/review?bug=738538&attachment=293196)

FYI: other similar elements wavparse, aifparse also subclass from GstElement.

::: gst/cafdemux/gstcafdemux.c
@@ +24,3 @@
+/**
+ * SECTION:element-cafdemux
+ * @see_also:

remove the empty @see_also:

@@ +143,3 @@
+  guint32 fileType = GST_READ_UINT32_LE (map->data);
+  guint16 version = GST_READ_UINT16_BE (map->data + 4);
+  guint16 flags = GST_READ_UINT16_BE (map->data + 6);

this will probably emit a "assigned, but unused variable warning" if debug is
disabled. The spec states
"""
For CAF v1 files, must be set to 0. You should ignore any value of this field
you don’t understand.
"""
So I'd add a
if (flags != 0) {
  GST_WARNING_OBJECT (caf, "Unhandled flags 0x%x", (guint) flags);
}

@@ +163,3 @@
+  const gboolean isFloat = (formatFlags & 0x1) != 0;
+  const gboolean isLittleEndian = (formatFlags & 0x2) != 0;
+  const guint rate = (gint) sampleRate;

(guint) sampleRate

@@ +167,3 @@
+  GstCaps *caps;
+
+  if (sampleRate <= .0 || rate < 0) {

rate is guint and can't be < 0

@@ +179,3 @@
+  }
+
+  if (channelsPerFrame <= 0) {

channelsPerFrame is unsigned, only check for != 0

@@ +202,3 @@
+    }
+  } else {
+    switch (bitsPerChannel) {

shouldn't we support 8: also as it is simple?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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