Mercurial > mplayer.hg
changeset 32507:97738e6f82dc
Use IMGFMT to compare instead of PIX_FMT to avoid issues
with the "JPEG" formats like PIX_FMT_YUVJ422P.
author | reimar |
---|---|
date | Sat, 06 Nov 2010 21:49:49 +0000 |
parents | 85dd2718c84a |
children | ce7fa2398617 |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Sat Nov 06 21:41:12 2010 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Nov 06 21:49:49 2010 +0000 @@ -158,8 +158,8 @@ 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: @@ -948,7 +948,7 @@ 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;