omxvideodec: Support for egl_render on RPi breaks dynamic resolution changes
Submitted by min..@..arp.fm
When a dynamic resolution change occurs, gst_omx_video_dec_reconfigure_output_port() is called in order to ensure the change is negotiated correctly.
In the original code path, the format is obtained from the GPU and maintained untouched:
On the RPI specifically, support for egl_render kicks in and hard codes the format instead to RGBA:
state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (self), GST_VIDEO_FORMAT_RGBA, port_def.format.video.nFrameWidth, port_def.format.video.nFrameHeight, self->input_state);
This works fine if downstream supports RGBA, however omxh264enc does not and attempts to renegotiate I420. After renegotiating to I420, the above code hard codes the format back to RGBA and we hang.
The workaround is to skip egl_render, and the dynamic negotiation works again.
Question: why is it necessary to hard code RGBA here? Should we not just respect the original format?