mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
vdpau: reject decoding of non-4:2:0
Tried to decode a High 4:2:2 file, since libavcodec code seemed to indicate that it's supported. Well, it decodes to garbage. I couldn't find out why ffmpeg.c actually appears to reject this correctly. The API seems to be fine with, just that the output is garbage. Add a hack for now.
This commit is contained in:
parent
9d69eae162
commit
4b3b3a045a
@ -39,6 +39,11 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
|
||||
struct priv *p = ctx->hwdec_priv;
|
||||
int sw_format = ctx->avctx->sw_pix_fmt;
|
||||
|
||||
if (sw_format != AV_PIX_FMT_YUV420P && sw_format != AV_PIX_FMT_NV12) {
|
||||
MP_VERBOSE(ctx, "Rejecting non 4:2:0 8 bit decoding.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hwdec_setup_hw_frames_ctx(ctx, p->mpvdp->av_device_ref, sw_format, 0) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user