On 2013-03-22 15:30:17 +0100, Anton Khirnov wrote:
> ---
>  libavcodec/utils.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index e18f42d..42493e1 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -900,7 +900,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext 
> *avctx, const AVCodec *code
>      if ((ret = av_opt_set_dict(avctx, &tmp)) < 0)
>          goto free_and_end;
>  
> -    if (avctx->coded_width && avctx->coded_height)
> +    if (avctx->coded_width && avctx->coded_height && !avctx->width && 
> !avctx->height)
>          avcodec_set_dimensions(avctx, avctx->coded_width, 
> avctx->coded_height);
>      else if (avctx->width && avctx->height)
>          avcodec_set_dimensions(avctx, avctx->width, avctx->height);

probably ok, someone who sets coded_width and coded_height but leaves
width xor height at zero deserves strange errors

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to