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 683098 - videodecoder: log failure message if acquire_buffer failed
videodecoder: log failure message if acquire_buffer failed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal minor
: 1.0.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-31 12:02 UTC by sreerenj
Modified: 2012-10-17 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
throw error message if acquire_buffer failed (1.07 KB, patch)
2012-08-31 12:02 UTC, sreerenj
reviewed Details | Review
videodecoder: post error message if acquire_buffer failed (1.36 KB, patch)
2012-09-01 15:39 UTC, sreerenj
rejected Details | Review

Description sreerenj 2012-08-31 12:02:01 UTC
Created attachment 223042 [details] [review]
throw error message if acquire_buffer failed

videodecoder:throw error message if acquire_buffer failed
Comment 1 Tim-Philipp Müller 2012-08-31 22:25:05 UTC
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.
Comment 2 sreerenj 2012-09-01 06:55:58 UTC
(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?
Comment 3 sreerenj 2012-09-01 15:39:52 UTC
Created attachment 223148 [details] [review]
videodecoder: post error message if acquire_buffer failed

posting error message to bus
Comment 4 sreerenj 2012-09-01 15:45:34 UTC
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?
Comment 5 Tim-Philipp Müller 2012-10-17 10:14:45 UTC
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 6 Tim-Philipp Müller 2012-10-17 10:16:02 UTC
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.
Comment 7 sreerenj 2012-10-17 11:25:34 UTC
hm,,,please be bit more careful in the future.. :(