[x264-devel] Check for invalid pixfmts in lavf demuxer

Oka Motofumi git at videolan.org
Thu May 12 08:38:55 CEST 2011


x264 | branch: master | Oka Motofumi <chikuzen.mo at gmail.com> | Thu Apr 28 13:13:49 2011 +0900| [d18995ef0b61d018cf380397eb5d6d44b47ad7c0] | committer: Jason Garrett-Glaser

Check for invalid pixfmts in lavf demuxer

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=d18995ef0b61d018cf380397eb5d6d44b47ad7c0
---

 input/lavf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/input/lavf.c b/input/lavf.c
index 185ecfb..dc9fe55 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", &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 */



More information about the x264-devel mailing list