mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
Return AVERROR(EINVAL) when invalid width and/or height are specified to
avcodec_open. Originally committed as revision 9770 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
90f06ceaa0
commit
7868349a91
@ -847,6 +847,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec)
|
|||||||
|
|
||||||
if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){
|
if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){
|
||||||
av_freep(&avctx->priv_data);
|
av_freep(&avctx->priv_data);
|
||||||
|
ret = AVERROR(EINVAL);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user