ffmpeg compilation problem: avcodec_find_decoder always returns null

后端 未结 2 1911
执笔经年
执笔经年 2020-12-19 09:13

I recently tried to upgrade the ffmpeg libraries I use in my Mac OS X application by downloading and compiling ffmpeg from source.

My code works correctly with pre-c

2条回答
  •  一向
    一向 (楼主)
    2020-12-19 10:16

    in av_register_all():

    static int initialized;
    if (initialized)  
        return;
    initialized = 1;
    avcodec_register_all();
    

    Maybe due to some unnoticed factors, the static int variable "initialized" has been initialized while the avcodec has not been registered...Then we should call avcodec_register_all() to explicitly fulfill it. But I am inclined to think that it is a bug in ffmpeg.

提交回复
热议问题