mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
plugin: encode: set allowed_sinkpad_caps to empty.
We now set encode->allowed_sinkpad_caps to NULL if we fail to get surfaces formats. This causes two problem: 1. gst_video_encoder_proxy_getcaps use NULL as its caps parameter, which changes its behavior. It will use encode's sinkpad template rather than empty caps to do the clip job. So even if we fail to set allowed_sinkpad_caps, gst_video_encoder_proxy_getcaps can still return valid caps. 2. We should just set the allowed_sinkpad_caps once. The NULL point make the ensure_allowed_sinkpad_caps function works again and again.
This commit is contained in:
parent
5ad67ea666
commit
3355cd4691
1 changed files with 3 additions and 0 deletions
|
@ -441,6 +441,9 @@ ensure_allowed_sinkpad_caps (GstVaapiEncode * encode)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
|
if (!encode->allowed_sinkpad_caps)
|
||||||
|
encode->allowed_sinkpad_caps = gst_caps_new_empty ();
|
||||||
|
|
||||||
if (out_caps)
|
if (out_caps)
|
||||||
gst_caps_unref (out_caps);
|
gst_caps_unref (out_caps);
|
||||||
if (raw_caps)
|
if (raw_caps)
|
||||||
|
|
Loading…
Reference in a new issue