From 788c2881c09795dbe2c00c8e73b0bfb4664c90d5 Mon Sep 17 00:00:00 2001 From: Oka Motofumi <chikuzen.mo@gmail.com> Date: Thu, 28 Apr 2011 13:13:49 +0900 Subject: [PATCH] Check for invalid pixfmts in lavf demuxer --- input/lavf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/input/lavf.c b/input/lavf.c index 185ecfb9..dc9fe55f 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -145,6 +145,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c return -1; sscanf( opt->resolution, "%dx%d", ¶m->width, ¶m->height ); param->pix_fmt = opt->colorspace ? av_get_pix_fmt( opt->colorspace ) : PIX_FMT_YUV420P; + FAIL_IF_ERROR( param->pix_fmt == PIX_FMT_NONE, "unsupported colorspace: %s\n", opt->colorspace ); } /* specify the input format. this is helpful when lavf fails to guess */ -- 2.40.0