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 740686 - audiodecoder: Error not handled in gst_audio_decoder_drain
audiodecoder: Error not handled in gst_audio_decoder_drain
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-25 13:38 UTC by Sanjay NM
Modified: 2014-12-14 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
audio: Handled return value in function gst_audio_decoder_drain (1.35 KB, patch)
2014-11-25 13:43 UTC, Sanjay NM
needs-work Details | Review
audio: Added error handling in gst_audio_decoder_drain (1.71 KB, patch)
2014-12-10 10:48 UTC, Sanjay NM
committed Details | Review

Description Sanjay NM 2014-11-25 13:38:27 UTC
In function gst_audio_decoder_drain (gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c) ret is not used in this function and there is no action taken based on return value.
Comment 1 Sanjay NM 2014-11-25 13:43:31 UTC
Created attachment 291456 [details] [review]
audio: Handled return value in function gst_audio_decoder_drain

Handled return value in this function and returning back appropriate value
Comment 2 Sebastian Dröge (slomo) 2014-11-27 10:28:34 UTC
Review of attachment 291456 [details] [review]:

::: gst-libs/gst/audio/gstaudiodecoder.c
@@ +1455,3 @@
     ret = gst_audio_decoder_output (dec, NULL);
+    if (ret != GST_FLOW_OK)
+      goto drain_failed;

I think in both "goto drain_failed" cases you still want to go through the lines below here: clear the adapter and the list of frames.
Comment 3 Sebastian Dröge (slomo) 2014-11-27 10:28:54 UTC
And log something if it fails :)
Comment 4 Sanjay NM 2014-12-10 10:48:59 UTC
Created attachment 292426 [details] [review]
audio: Added error handling in gst_audio_decoder_drain

Error was not checked in 2 functions. added this check in gst_audio_decoder_drain
Comment 5 Sebastian Dröge (slomo) 2014-12-14 11:06:12 UTC
commit d226d45d2f1203a3f033e8270447d3726e5130b7
Author: Sanjay NM <sanjay.nm@samsung.com>
Date:   Wed Dec 10 16:10:58 2014 +0530

    audio: Add error handling to gst_audio_decoder_drain()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740686