aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ve_lavc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 34952cff47..2555ef6fc2 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -609,6 +609,10 @@ static int config(struct vf_instance_s* vf,
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: