plugin: encode: set allowed_sinkpad_caps to empty.
authorHe Junyan <junyan.he@hotmail.com>
Sun, 22 Dec 2019 06:35:18 +0000 (14:35 +0800)
committerHe Junyan <junyan.he@hotmail.com>
Sun, 22 Dec 2019 17:28:56 +0000 (01:28 +0800)
commit3355cd46917bc092f5f237b8154749cfff5c68b6
tree19efc9e6a0b38dece773b95dc29253df125665b2
parent5ad67ea666c96ecd01212caa39ad0b1432e6d726
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.
gst/vaapi/gstvaapiencode.c