Mercurial > libavcodec.hg
changeset 1397:2e43c9bdc982 libavcodec
check input pix_fmt
author | michaelni |
---|---|
date | Tue, 05 Aug 2003 14:08:28 +0000 |
parents | e380ac39024a |
children | d413f9a20214 |
files | mpegvideo.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Tue Aug 05 10:19:43 2003 +0000 +++ b/mpegvideo.c Tue Aug 05 14:08:28 2003 +0000 @@ -1364,7 +1364,6 @@ // empty }else{ int h_chroma_shift, v_chroma_shift; - avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift); for(i=0; i<3; i++){ @@ -1548,6 +1547,11 @@ AVFrame *pic_arg = data; int i; + if(avctx->pix_fmt != PIX_FMT_YUV420P){ + fprintf(stderr, "this codec supports only YUV420P\n"); + return -1; + } + init_put_bits(&s->pb, buf, buf_size, NULL, NULL); s->picture_in_gop_number++;