summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-06 21:49:49 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:05:11 +0200
commitf1e637b827880fded695789cd9c17a30d958a639 (patch)
tree35645ecea149342a9a8249173b8d2012933f1f6e /libmpcodecs
parent01a10dd5795b7258a21f5e0128d4f0f016b37868 (diff)
downloadmpv-f1e637b827880fded695789cd9c17a30d958a639.tar.bz2
mpv-f1e637b827880fded695789cd9c17a30d958a639.tar.xz
vd_ffmpeg: compare IMGFMT instead of PIX_FMT
Use IMGFMT to compare instead of PIX_FMT to avoid issues with the "JPEG" formats like PIX_FMT_YUVJ422P. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32594 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 556542f481..0096737fdf 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -138,8 +138,8 @@ static int control(sh_video_t *sh, int cmd, void *arg, ...){
case IMGFMT_IYUV:
case IMGFMT_I420:
// "converted" using pointer/stride modification
- if(avctx->pix_fmt==PIX_FMT_YUV420P) return CONTROL_TRUE;// u/v swap
- if(avctx->pix_fmt==PIX_FMT_YUV422P && !ctx->do_dr1) return CONTROL_TRUE;// half stride
+ if(ctx->best_csp == IMGFMT_YV12) return CONTROL_TRUE;// u/v swap
+ if(ctx->best_csp == IMGFMT_422P && !ctx->do_dr1) return CONTROL_TRUE;// half stride
break;
#if CONFIG_XVMC
case IMGFMT_XVMC_IDCT_MPEG2:
@@ -876,7 +876,7 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len,
if (!mpi->planes[0])
return NULL;
- if(avctx->pix_fmt==PIX_FMT_YUV422P && mpi->chroma_y_shift==1){
+ if(ctx->best_csp == IMGFMT_422P && mpi->chroma_y_shift==1){
// we have 422p but user wants 420p
mpi->stride[1]*=2;
mpi->stride[2]*=2;