[gstreamer-bugs] [Bug 619293] [avimux] clean up avi header creation code

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat May 22 02:25:28 PDT 2010


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

Benjamin Otte (Company) <otte> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |otte at gnome.org

--- Comment #2 from Benjamin Otte (Company) <otte at gnome.org> 2010-05-22 09:25:26 UTC ---
>From the patch:
+  g_return_if_fail (gst_byte_writer_pop_mark (bw, &data, &pos, &size));
+
Please do not ever put vital code into g_return_if_fail(), g_warn_if_fail() or
g_assert(), as those are macros that can be disabled at compile time and cause
bugs that are hard to find. It's really really important that this never
happens. The currect way to write this is:
+  if (!gst_byte_writer_pop_mark (bw, &data, &pos, &size))
+    g_return_if_reached();
+
If you have done so before and reviews haven't caught it, please go back and
check the elements.

I've spent a really long time in a previous life going through all of these
macros making sure they don't do bad stuff, which is why I'm very sensitive to
this. ;)

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