Commit 8f1620b2 authored by Jean-Paul Saman's avatar Jean-Paul Saman

codec/avcodec/vaapi_x11.c: debugging

Add some more debugging code.
parent 50d8a585
......@@ -735,6 +735,8 @@ static void PictureRelease(picture_t *picture)
static void PictureReleaseVoutOwned(picture_t *picture)
{
assert(picture->format.i_chroma != VLC_CODEC_VAAPI_SURFACE);
if (!picture->p_sys->b_own_vout)
abort();
......@@ -757,8 +759,7 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
if (!subpicture)
return;
if (subpicture->b_ephemer)
return;
assert(!subpicture->b_ephemer);
/* Cleanup for reclaimed surface */
if (picture->p_sys &&
......@@ -777,7 +778,7 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
if (!picture->p_sys)
return;
assert(picture->p_sys->surface);
assert(picture->pf_release);
assert(picture->pf_release == NULL);
picture->pf_release = PictureReleaseVoutOwned;
}
......@@ -826,7 +827,8 @@ static void DisplayVASurface(vout_display_t *vd, VASurfaceID surface, picture_t
(picture->b_top_field_first ? VA_TOP_FIELD : VA_BOTTOM_FIELD));
if (status != VA_STATUS_SUCCESS)
msg_Err(vd, "failed displaying picture (id=%d) %d", surface, status);
msg_Err(vd, "failed displaying picture: %d (surface id=%d): %p",
status, surface, picture);
}
static void DisplayPicture(vout_display_t *vd, picture_t *pic, subpicture_t *subpicture)
......@@ -835,6 +837,7 @@ static void DisplayPicture(vout_display_t *vd, picture_t *pic, subpicture_t *sub
if (pic->p_sys == NULL)
{
assert(pic->format.i_chroma == VLC_CODEC_VAAPI_SURFACE);
msg_Err(vd, "Discarding picture without picture_sys_t information");
if (subpicture)
subpicture_Delete(subpicture);
......@@ -844,8 +847,9 @@ static void DisplayPicture(vout_display_t *vd, picture_t *pic, subpicture_t *sub
if (pic->p_sys->surface == NULL)
{
assert(pic->format.i_chroma == VLC_CODEC_VAAPI_SURFACE);
assert(!pic->p_sys->b_own_vout);
msg_Err(vd, "Discarding picture without surface information");
msg_Err(vd, "Discarding picture without surface information: %p", pic);
if (pic->p_sys->subpicture)
SubpictureDestroy(vd, pic->p_sys->subpicture, pic->p_sys->i_sub);
if (subpicture)
......
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