Commit b4d89b98 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

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.
parent b5dde037
......@@ -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) {
goto beach;
ret = gst_buffer_pool_acquire_buffer (pool, &buffer, NULL);
g_object_unref (pool);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment