New Parameter -r for Refreshrate with DRM

Fixed aspectratio with DRM
This commit is contained in:
jojo61
2019-12-12 11:31:40 +01:00
parent 3bed988b14
commit d2dedb40dd
5 changed files with 46 additions and 99 deletions

View File

@@ -473,7 +473,7 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt)
{
AVCodecContext *video_ctx = decoder->VideoCtx;
if (video_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
if (video_ctx->codec_type == AVMEDIA_TYPE_VIDEO && CuvidTestSurfaces()) {
int ret;
AVPacket pkt[1];
AVFrame *frame;
@@ -483,7 +483,11 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt)
if (ret < 0) {
Debug(4, "codec: sending video packet failed");
return;
}
}
if (!CuvidTestSurfaces())
usleep(1000);
frame = av_frame_alloc();
ret = avcodec_receive_frame(video_ctx, frame);
if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) {