[MPlayer-cvslog] r32594 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Nov 6 22:49:49 CET 2010


Author: reimar
Date: Sat Nov  6 22:49:49 2010
New Revision: 32594

Log:
Use IMGFMT to compare instead of PIX_FMT to avoid issues
with the "JPEG" formats like PIX_FMT_YUVJ422P.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sat Nov  6 22:41:12 2010	(r32593)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Nov  6 22:49:49 2010	(r32594)
@@ -158,8 +158,8 @@ static int control(sh_video_t *sh, int c
         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 @@ static mp_image_t *decode(sh_video_t *sh
     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;


More information about the MPlayer-cvslog mailing list