GNOME Bugzilla – Bug 698894
mulawdec: Change base class to GstAudioDecoder
Last modified: 2013-05-21 13:18:35 UTC
Created attachment 242461 [details] [review] Patch This patch changes the base class to gstaudiodecoder - making it more in line with the newly changed mulawenc.
commit 3ec9673dfcd539f57808f20460d3eabbb16b7895 Author: Alexander Schrab <meros@meros-desktop.(none)> Date: Thu Apr 25 21:50:33 2013 +0200 mulawdec: change base class to GstAudioDecoder https://bugzilla.gnome.org/show_bug.cgi?id=698894
> Author: Alexander Schrab <meros@meros-desktop.(none)> If you could fix your git setup on that computer, that'd be great ;)
(In reply to comment #2) > > Author: Alexander Schrab <meros@meros-desktop.(none)> > > If you could fix your git setup on that computer, that'd be great ;) NOOOOO!!! You just ruined my blissful ignorance :( ON A FRIDAY!
Created attachment 244908 [details] [review] Patch on top of previous patch do not crash on NULL buffers gboolean instead of GstFlowReturn
Found some new problems - specifically we can get NULL for buffers in handle_frame. I think return TRUE is ok for mulawdec in that case. Also fixed the function signature for handle_frame
Review of attachment 244908 [details] [review]: ::: gst/law/mulaw-decode.c @@ +94,1 @@ gst_mulawdec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer) It should return a GstFlowReturn (same for the encoder). So don't return things like TRUE and FALSE (it already returns FALSE in an error case currently)
You are of course right. I was tricked by the return FALSE and the fact that many of the other functions do have gboolean as signature... I'll fix (In reply to comment #6) > Review of attachment 244908 [details] [review]: > > ::: gst/law/mulaw-decode.c > @@ +94,1 @@ > gst_mulawdec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer) > > It should return a GstFlowReturn (same for the encoder). So don't return things > like TRUE and FALSE (it already returns FALSE in an error case currently)
Created attachment 244909 [details] [review] Don't crash on null buffer
commit a1df0503568700f3261fa7e2ae80cac7bf4826d5 Author: Alexander Schrab <alexas@axis.com> Date: Tue May 21 13:33:59 2013 +0200 mulawdec: Handle NULL buffers in handle_frame https://bugzilla.gnome.org/show_bug.cgi?id=698894