After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698894 - mulawdec: Change base class to GstAudioDecoder
mulawdec: Change base class to GstAudioDecoder
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal enhancement
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-25 19:52 UTC by Alexander Schrab
Modified: 2013-05-21 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (16.29 KB, patch)
2013-04-25 19:52 UTC, Alexander Schrab
committed Details | Review
Patch on top of previous patch (1.36 KB, patch)
2013-05-21 11:36 UTC, Alexander Schrab
needs-work Details | Review
Don't crash on null buffer (987 bytes, patch)
2013-05-21 11:53 UTC, Alexander Schrab
committed Details | Review

Description Alexander Schrab 2013-04-25 19:52:54 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.
Comment 1 Sebastian Dröge (slomo) 2013-04-26 06:48:27 UTC
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
Comment 2 Tim-Philipp Müller 2013-04-26 08:29:18 UTC
> Author: Alexander Schrab <meros@meros-desktop.(none)>

If you could fix your git setup on that computer, that'd be great ;)
Comment 3 Alexander Schrab 2013-04-26 11:34:46 UTC
(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!
Comment 4 Alexander Schrab 2013-05-21 11:36:14 UTC
Created attachment 244908 [details] [review]
Patch on top of previous patch

do not crash on NULL buffers
gboolean instead of GstFlowReturn
Comment 5 Alexander Schrab 2013-05-21 11:37:39 UTC
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
Comment 6 Sebastian Dröge (slomo) 2013-05-21 11:41:18 UTC
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)
Comment 7 Alexander Schrab 2013-05-21 11:47:06 UTC
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)
Comment 8 Alexander Schrab 2013-05-21 11:53:25 UTC
Created attachment 244909 [details] [review]
Don't crash on null buffer
Comment 9 Sebastian Dröge (slomo) 2013-05-21 13:18:32 UTC
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