diff libmpcodecs/ve_lavc.c @ 14775:5b5417f6b598

Use PIX_FMT_YUVJ420P for mjpeg so that vstrict=-1 is not necessary
author reimar
date Wed, 23 Feb 2005 00:10:26 +0000
parents 35001ce5b853
children e1bf5e07962f
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Tue Feb 22 23:43:30 2005 +0000
+++ b/libmpcodecs/ve_lavc.c	Wed Feb 23 00:10:26 2005 +0000
@@ -609,6 +609,10 @@
     switch(lavc_param_format)
     {
 	case IMGFMT_YV12:
+	    // HACK, mjpeg accepts PIX_FMT_YUV420P only with vstrict=-1
+	    if (strcasecmp(lavc_param_vcodec, "mjpeg") == 0)
+	      lavc_venc_context->pix_fmt = PIX_FMT_YUVJ420P;
+	    else
 	    lavc_venc_context->pix_fmt = PIX_FMT_YUV420P;
 	    break;
 	case IMGFMT_422P: