GNOME Bugzilla – Bug 683098
videodecoder: log failure message if acquire_buffer failed
Last modified: 2012-10-17 11:25:34 UTC
Created attachment 223042 [details] [review] throw error message if acquire_buffer failed videodecoder:throw error message if acquire_buffer failed
What's the intention here? Do you just want to print a debug message or do you want to post an error message on the bus to make the pipeline stop? I don't know if GST_ERROR is appropriate here, I believe _acquire() is expected to fail in some cases, such as when the pipeline is being shut down and downstream provided the buffer pool, for example.
(In reply to comment #1) > What's the intention here? Do you just want to print a debug message or do you > want to post an error message on the bus to make the pipeline stop? > > I don't know if GST_ERROR is appropriate here, I believe _acquire() is expected > to fail in some cases, such as when the pipeline is being shut down and > downstream provided the buffer pool, for example. yup, it was failing when i provided a custom pool..But that was my implementation issue so i thought its better to have some ERROR message atleast ..Do you think it is better to post the error message to bus?
Created attachment 223148 [details] [review] videodecoder: post error message if acquire_buffer failed posting error message to bus
Not sure about the approach "output_buffer allocation failure => stop the application" . The decoder plugins might explicitly set the ouput_buffer if gst_video_decoder_allocate_output_buffer() returns NULL buffer, right?
Yes, an error message is not right here IMHO, failure to alloc a buffer could be for perfectly normal reasons (flushing, shut down). I have pushed this now: commit efff57d49746b37100f5137ed55fccd6399774e4 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed Oct 17 10:55:01 2012 +0100 videodecoder: return NULL from _allocate_output_buffer() if alloc fails .. instead of garbage pointer. Also log failure in debug log. Should've returned the flow return like _allocate_output_frame(). https://bugzilla.gnome.org/show_bug.cgi?id=683098 You should use _alloc_output_frame() whenever possible.
Comment on attachment 223042 [details] [review] throw error message if acquire_buffer failed Hrm, sorry, this is more or less exactly what I did as well. I didn't look again at this patch because of the confusing summary line ('throw error message') so thought it was irrelevant.
hm,,,please be bit more careful in the future.. :(