ffmpeg.c:2730: error: Null Dereference
  pointer `codec` last assigned on line 2723 could be null and is dereferenced at line 2730, column 8.

ffmpeg.c:2716:1: start of procedure find_codec_or_die()
2714. }
2715. 
2716. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2717. {
2718.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2718:32: Condition is true
2716. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2717. {
2718.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2719.     AVCodec *codec;
2720. 

ffmpeg.c:2718:5: 
2716. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2717. {
2718.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2719.     AVCodec *codec;
2720. 

ffmpeg.c:2721:9: Taking false branch
2719.     AVCodec *codec;
2720. 
2721.     if(!name)
              ^
2722.         return CODEC_ID_NONE;
2723.     codec = encoder ?

ffmpeg.c:2723:13: Condition is true
2721.     if(!name)
2722.         return CODEC_ID_NONE;
2723.     codec = encoder ?
                  ^
2724.         avcodec_find_encoder_by_name(name) :
2725.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2723:5: 
2721.     if(!name)
2722.         return CODEC_ID_NONE;
2723.     codec = encoder ?
          ^
2724.         avcodec_find_encoder_by_name(name) :
2725.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2726:9: Taking true branch
2724.         avcodec_find_encoder_by_name(name) :
2725.         avcodec_find_decoder_by_name(name);
2726.     if(!codec) {
              ^
2727.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2728.         av_exit(1);

ffmpeg.c:2727:9: Skipping av_log(): empty list of specs
2725.         avcodec_find_decoder_by_name(name);
2726.     if(!codec) {
2727.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2728.         av_exit(1);
2729.     }

ffmpeg.c:2728:9: Skipping av_exit(): empty list of specs
2726.     if(!codec) {
2727.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2728.         av_exit(1);
              ^
2729.     }
2730.     if(codec->type != type) {

ffmpeg.c:2730:8: 
2728.         av_exit(1);
2729.     }
2730.     if(codec->type != type) {
             ^
2731.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2732.         av_exit(1);
