Fix bug: VA-API intel software decoder broken.

This commit is contained in:
Johns 2012-02-01 18:36:24 +01:00
parent 27e9a88e2f
commit a7389111ff
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Fix bug: VA-API intel software decoder broken by aspect commit.
Add support for 4:3 output modes.
Quicker auto-crop after channel switch.
Add auto-crop support for Intel VA-API backend.

View File

@ -2188,6 +2188,8 @@ static enum PixelFormat Vaapi_get_format(VaapiDecoder * decoder,
slow_path:
// no accelerated format found
decoder->SurfacesNeeded = VIDEO_SURFACES_MAX + 2;
decoder->InputWidth = 0;
decoder->InputHeight = 0;
video_ctx->hwaccel_context = NULL;
return avcodec_default_get_format(video_ctx, fmt);
}
@ -3509,7 +3511,7 @@ static void VaapiRenderFrame(VaapiDecoder * decoder,
//
// Check image, format, size
//
if (decoder->Image->image_id == VA_INVALID_ID
if ((decoder->GetPutImage && decoder->Image->image_id == VA_INVALID_ID)
|| decoder->PixFmt != video_ctx->pix_fmt
|| width != decoder->InputWidth
|| height != decoder->InputHeight) {
@ -5744,12 +5746,13 @@ static enum PixelFormat Vdpau_get_format(VdpauDecoder * decoder,
VdpauSetupOutput(decoder);
Debug(3, "\t%#010x %s\n", fmt_idx[0], av_get_pix_fmt_name(fmt_idx[0]));
return *fmt_idx;
slow_path:
// no accelerated format found
decoder->SurfacesNeeded = VIDEO_SURFACES_MAX;
decoder->SurfacesNeeded = VIDEO_SURFACES_MAX + 2;
decoder->InputWidth = 0;
decoder->InputHeight = 0;
video_ctx->hwaccel_context = NULL;
return avcodec_default_get_format(video_ctx, fmt);
}