[Bug 644768] [dcaparse] implement 14-to-16-bit conversion

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 8 06:10:33 PDT 2011


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

Sebastian Dröge <slomo> changed:

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

--- Comment #10 from Sebastian Dröge <slomo at circular-chaos.org> 2011-09-08 13:10:26 UTC ---
Review of attachment 195921:
 --> (https://bugzilla.gnome.org/review?bug=644768&attachment=195921)

::: gst/audioparsers/gstdcaparse.c
@@ +172,3 @@
+  tcaps = gst_static_pad_template_get_caps (&src_template);
+  intersect_caps =
+      gst_caps_intersect_full (peercaps, tcaps, GST_CAPS_INTERSECT_FIRST);

This will fail if peercaps are NULL

@@ +174,3 @@
+      gst_caps_intersect_full (peercaps, tcaps, GST_CAPS_INTERSECT_FIRST);
+
+  if (intersect_caps && gst_caps_get_size (intersect_caps) > 0) {

Use && !gst_caps_is_empty() instead of the size check

@@ +479,3 @@
+      for (pos = 0; pos < size - 2; pos += 2) {
+        tmp = GST_READ_UINT16_BE (data + pos);
+        GST_WRITE_UINT16_LE (data + pos, tmp);

The loops could be the same for both conversions, they are doing exactly the
same

@@ +495,3 @@
+          ((GST_READ_UINT16_BE (data +
+                      pos14) << 2) | ((GST_READ_UINT16_BE (data + pos14 +
+                          2) >> 12) & 0x0003)));

This will not work. You have to put the READ result into a temporary variable
first

-- 
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