Fix channelswitch with YADIF deinterlacer

This commit is contained in:
jojo61 2023-09-22 12:00:08 +02:00
parent e0bbaceec0
commit 6704b2ca5a
2 changed files with 13 additions and 12 deletions

View File

@ -61,7 +61,7 @@ extern void ToggleLUT();
/// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name
/// for the distribution archive.
static const char *const VERSION = "3.13"
static const char *const VERSION = "3.14"
#ifdef GIT_REV
"-GIT" GIT_REV
#endif

23
video.c
View File

@ -2960,6 +2960,18 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder *decoder, AVCodecContext
VideoThreadUnlock();
// dont show first frame
#endif
} else {
decoder->SyncCounter = 0;
decoder->FrameCounter = 0;
decoder->FramesDisplayed = 0;
decoder->StartCounter = 0;
decoder->Closing = 0;
decoder->PTS = AV_NOPTS_VALUE;
VideoDeltaPTS = 0;
decoder->InputAspect = video_ctx->sample_aspect_ratio;
CuvidUpdateOutput(decoder); // update aspect/scaling
}
#ifdef YADIF
if (VideoDeinterlace[decoder->Resolution] == VideoDeinterlaceYadif) {
deint = 0;
@ -2973,17 +2985,6 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder *decoder, AVCodecContext
Fatal(_("codec: can't set option deint to video codec!\n"));
}
#endif
} else {
decoder->SyncCounter = 0;
decoder->FrameCounter = 0;
decoder->FramesDisplayed = 0;
decoder->StartCounter = 0;
decoder->Closing = 0;
decoder->PTS = AV_NOPTS_VALUE;
VideoDeltaPTS = 0;
decoder->InputAspect = video_ctx->sample_aspect_ratio;
CuvidUpdateOutput(decoder); // update aspect/scaling
}
CuvidMessage(2, "GetFormat Init ok %dx%d\n", video_ctx->width, video_ctx->height);
decoder->InputAspect = video_ctx->sample_aspect_ratio;