Skip to content

theoradec: fix buffer pool selection and configuration

Michael Olbrich requested to merge mol/gstreamer:theoradec into main

This fixes a regression introduced by b660f258 ("theoradec: make sure the selected pool accepts the new config").

Originally, theora_dec_decide_allocation() called the base class decide_allocation() first and then modified to pool config when the decoded size was larger than the final frame size.

However, gst_buffer_pool_set_config() failures where ignored which could cause assertion failures in theora_handle_image() later.

This was fixed by the commit mentioned above by doing gst_buffer_pool_set_config() first, remove the pool if it failed and then call the base class decide_allocation().

But the base class decide_allocation() overwrites the pool config again so the changes are lost. The result are assertion failures in other cases.

So do the base class decide_allocation() first again. And if gst_buffer_pool_set_config() fails afterwards then remove the pool and call the base class decide_allocation() again to create a new pool.

Fixes #2612 (closed)

Merge request reports

Loading