[FFmpeg-devel] [PATCH] avcodec/utils: Warn if a codec is opened with a codec id without codec descriptor

James Almer jamrial at gmail.com
Mon Jun 1 20:29:36 CEST 2015


On 01/06/15 3:27 PM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavcodec/utils.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 7e3f92a..22e826f 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -1453,6 +1453,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
>      }
>      avctx->frame_number = 0;
>      avctx->codec_descriptor = avcodec_descriptor_get(avctx->codec_id);
> +    if (!avctx->codec_descriptor)
> +        av_log(avctx, AV_LOG_WARNING, "No codec descriptor found for codec_id\n");

Maybe verbose/debug? Is this a warning we want non-developers to see in a normal situation?

>  
>      if (avctx->codec->capabilities & CODEC_CAP_EXPERIMENTAL &&
>          avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
> 



More information about the ffmpeg-devel mailing list