GNOME Bugzilla – Bug 786442
segfault encoding rawvideo since omxvideoenc: ensure enough buffers are allocated in the pool
Last modified: 2017-09-06 13:17:26 UTC
Created attachment 357836 [details] command + gdb bt Testing AMD VCE via omxh264enc bellagio since gst-omx commit - commit 3f5d98a360d657e904fadedb4804b03952204f63 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Mon Jul 10 15:00:58 2017 +0200 omxvideoenc: ensure enough buffers are allocated in the pool Handle allocation query and ensure enough buffers are allocated in the negotiated pool. This help preventing buffer starvation in the pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=785122 I segfault when trying to encode rawvideo. The same command replacing rawvideo file input with videotestsrc does not segfault. Attached example command and gdb bt
Created attachment 358585 [details] [review] omxvideoenc: fix crash in propose_allocation if input not defined Early return rather than deferencing a NULL pointer if self->input_state isn't defined when propose_allocation() is called.
Review of attachment 358585 [details] [review]: ::: omx/gstomxvideoenc.c @@ +1911,3 @@ + return FALSE; + + size = self->input_state->info.size; I think you could read the caps from the query, tranform to VideoInfo and get the size from there.
Created attachment 358758 [details] [review] omxvideoenc: use caps from query in propose_allocation Prevent crash by not deferencing a NULL pointer if self->input_state isn't defined when propose_allocation() is called.
Review of attachment 358585 [details] [review]: ::: omx/gstomxvideoenc.c @@ +1911,3 @@ + return FALSE; + + size = self->input_state->info.size; Done. But in this specific case that doesn't help as the caps from the query is NULL as well. Is that another bug?
Review of attachment 358758 [details] [review]: This is common pattern, just look at most video sinks in general. Not sure why the caps may endup NULL though.
Attachment 358758 [details] pushed as 79df3b0 - omxvideoenc: use caps from query in propose_allocation