Commit 788c2881 authored by Oka Motofumi's avatar Oka Motofumi Committed by Fiona Glaser
Browse files

Check for invalid pixfmts in lavf demuxer

parent 80a661e2
......@@ -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", &param->width, &param->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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment