comparison utils.c @ 5383:8a28860d54ba libavcodec

Return AVERROR(EINVAL) when invalid width and/or height are specified to avcodec_open.
author takis
date Fri, 20 Jul 2007 15:09:10 +0000
parents 7f96f6e16f81
children acaaff7b6fb8
comparison
equal deleted inserted replaced
5382:7f96f6e16f81 5383:8a28860d54ba
845 else if(avctx->width && avctx->height) 845 else if(avctx->width && avctx->height)
846 avcodec_set_dimensions(avctx, avctx->width, avctx->height); 846 avcodec_set_dimensions(avctx, avctx->width, avctx->height);
847 847
848 if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){ 848 if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){
849 av_freep(&avctx->priv_data); 849 av_freep(&avctx->priv_data);
850 ret = AVERROR(EINVAL);
850 goto end; 851 goto end;
851 } 852 }
852 853
853 avctx->codec = codec; 854 avctx->codec = codec;
854 avctx->codec_id = codec->id; 855 avctx->codec_id = codec->id;