vaapivideobufferpool: fix regression with video metas

There is another regression with 7a206923 when setting the video
info for the video meta, it should be the one from the image's
allocator rather from the allocation caps.

Test pipeline:

  gst-launch-1.0 filesrc location=bug766184.flv ! decodebin \
      ! tee ! videoconvert ! videoscale                     \
      ! video/x-raw, width=1920, height=1080 ! xvimagesink
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-06-23 17:33:03 +02:00
parent 05a41009f2
commit 7d7f722a18

View file

@ -228,11 +228,11 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
negotiated_vinfo = negotiated_vinfo =
gst_allocator_get_vaapi_negotiated_video_info (priv->allocator); gst_allocator_get_vaapi_negotiated_video_info (priv->allocator);
allocator_vinfo = gst_allocator_get_vaapi_video_info (allocator, NULL);
priv->vmeta_vinfo = (negotiated_vinfo) ? priv->vmeta_vinfo = (negotiated_vinfo) ?
*negotiated_vinfo : new_allocation_vinfo; *negotiated_vinfo : *allocator_vinfo;
/* last resource to set the correct buffer size */ /* last resource to set the correct buffer size */
allocator_vinfo = gst_allocator_get_vaapi_video_info (allocator, NULL);
if (GST_VIDEO_INFO_SIZE (allocator_vinfo) != size) { if (GST_VIDEO_INFO_SIZE (allocator_vinfo) != size) {
gst_buffer_pool_config_set_params (config, caps, gst_buffer_pool_config_set_params (config, caps,
GST_VIDEO_INFO_SIZE (allocator_vinfo), min_buffers, max_buffers); GST_VIDEO_INFO_SIZE (allocator_vinfo), min_buffers, max_buffers);