mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
v4l2videodec: Protect NULL pool while going to READY
When the pipeline fails early, the pool might be unset before the processing thread has run once. Add protection against that.
This commit is contained in:
parent
b5dde037b4
commit
b4d89b9809
1 changed files with 7 additions and 0 deletions
|
@ -377,6 +377,13 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
|
|||
* comes in and holding this lock would prevent that.
|
||||
*/
|
||||
pool = gst_video_decoder_get_buffer_pool (decoder);
|
||||
|
||||
/* Pool may be NULL if we started going to READY state */
|
||||
if (pool == NULL) {
|
||||
ret = GST_FLOW_FLUSHING;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
ret = gst_buffer_pool_acquire_buffer (pool, &buffer, NULL);
|
||||
g_object_unref (pool);
|
||||
|
||||
|
|
Loading…
Reference in a new issue