diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
commit | 4ebf0075806ccf2bdde276a4e56eac41c7e350c4 (patch) | |
tree | 89b4572543527808c92f4e37448bca4012e926ad /libmpcodecs/ve_lavc.c | |
parent | efd25f7811b232ae2b1899ca0fee6fd598837b9f (diff) | |
parent | c2ba58aefce038ce4ccf6ed23791f5de823aa041 (diff) | |
download | mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.bz2 mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.xz |
Merge svn changes up to r30375
Diffstat (limited to 'libmpcodecs/ve_lavc.c')
-rw-r--r-- | libmpcodecs/ve_lavc.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 3062d9ca5d..5955787204 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -15,6 +15,7 @@ #include "mp_msg.h" #include "help_mp.h" #include "av_opts.h" +#include "osdep/strsep.h" #include "codec-cfg.h" #include "stream/stream.h" @@ -24,6 +25,7 @@ #include "libmpdemux/muxer.h" #include "img_format.h" +#include "fmt-conversion.h" #include "mp_image.h" #include "vf.h" @@ -593,30 +595,9 @@ static int config(struct vf_instance* vf, } mux_v->imgfmt = lavc_param_format; - switch(lavc_param_format) - { - case IMGFMT_YV12: - lavc_venc_context->pix_fmt = PIX_FMT_YUV420P; - break; - case IMGFMT_422P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV422P; - break; - case IMGFMT_444P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV444P; - break; - case IMGFMT_411P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV411P; - break; - case IMGFMT_YVU9: - lavc_venc_context->pix_fmt = PIX_FMT_YUV410P; - break; - case IMGFMT_BGR32: - lavc_venc_context->pix_fmt = PIX_FMT_RGB32; - break; - default: - mp_msg(MSGT_MENCODER,MSGL_ERR,"%s is not a supported format\n", vo_format_name(lavc_param_format)); - return 0; - } + lavc_venc_context->pix_fmt = imgfmt2pixfmt(lavc_param_format); + if (lavc_venc_context->pix_fmt == PIX_FMT_NONE) + return 0; if(!stats_file) { /* lavc internal 2pass bitrate control */ |