Commit 773793f8 authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI spu: various

Various fixes:
- lower message priority for some
- do not crash in vlc_va_spu_Get() when number of subpicture regions do not match
  the cached SPU array for this subpicture
parent 0ddc5d27
......@@ -440,7 +440,7 @@ static va_spu_cache_t *va_spu_cache_Create(vlc_object_t *obj, vlc_va_conn_t *va,
float global_alpha = (float)(subpicture->i_alpha * region->i_alpha / 255) / 255;
status = vaSetSubpictureGlobalAlpha(va->p_display, vasub_cache->i_id, global_alpha);
if (status != VA_STATUS_SUCCESS)
msg_Err(obj, "failed applying alpha value to subpicture");
msg_Warn(obj, "failed applying alpha value to subpicture");
}
if (b_chroma)
......@@ -457,7 +457,7 @@ static va_spu_cache_t *va_spu_cache_Create(vlc_object_t *obj, vlc_va_conn_t *va,
status = vaSetSubpictureChromakey(va->p_display, vasub_cache->i_id,
min, max, mask);
if (status != VA_STATUS_SUCCESS)
msg_Err(obj, "failed applying chroma valuesto subpicture");
msg_Warn(obj, "failed applying chroma values to subpicture");
}
vasub_cache->rect.i_x = region->i_x;
......@@ -799,9 +799,14 @@ int vlc_va_spu_cache_Get(vlc_object_t *obj, vlc_va_spu_cache_t *spu, const unsig
if (region->fmt.i_chroma != VLC_CODEC_RGBA)
continue;
/* Ooh: big booboo */
/* Ooh: big booboo
* va_spu_cache_Create() failed for some of the subpicture regions. */
if (i_sub >= count)
#ifdef VAAPI_DEBUG
abort();
#else
goto cleanup;
#endif
va_spu_cache_t *vasubpic;
vasubpic = (va_spu_cache_t *) vlc_array_item_at_index(&cache->subpictures, i_sub);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment