Skip to content

Commit

Permalink
MythVDPAUContext: Disallow YUVJ420P frame format
Browse files Browse the repository at this point in the history
- FFmpeg will disallow it later
  • Loading branch information
mark-kendall committed May 27, 2019
1 parent 47e41e7 commit 67889f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/mythvdpaucontext.cpp
Expand Up @@ -112,8 +112,9 @@ MythCodecID MythVDPAUContext::GetSupportedCodec(AVCodecContext *Context, AVCodec
return failure;

// VDPAU only supports 8bit 420p:(
// N.B. It should probably be possible to force YUVJ420P support
VideoFrameType type = PixelFormatToFrameType(Context->pix_fmt);
bool vdpau = (type == FMT_YV12) && MythVDPAUHelper::HaveVDPAU() &&
bool vdpau = (type == FMT_YV12) && (AV_PIX_FMT_YUVJ420P != Context->pix_fmt) && MythVDPAUHelper::HaveVDPAU() &&
(decodeonly ? codec_is_vdpau_dechw(success) : codec_is_vdpau_hw(success));
if (vdpau && (success == kCodec_MPEG4_VDPAU || success == kCodec_MPEG4_VDPAU_DEC))
vdpau = MythVDPAUHelper::HaveMPEG4Decode();
Expand Down

0 comments on commit 67889f4

Please sign in to comment.