diff --git a/ChangeLog b/ChangeLog index be1fcf2..e9cef03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/video.c b/video.c index b0e122a..c601c34 100644 --- a/video.c +++ b/video.c @@ -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); }