GNOME Bugzilla – Bug 740686
audiodecoder: Error not handled in gst_audio_decoder_drain
Last modified: 2014-12-14 11:06: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.
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
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.
And log something if it fails :)
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
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