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

ffmpeg.c:3103:1: start of procedure find_codec_or_die()
3101. }
3102. 
3103. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3104. {
3105.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3105:32: Condition is true
3103. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3104. {
3105.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3106.     AVCodec *codec;
3107. 

ffmpeg.c:3105:5: 
3103. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3104. {
3105.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3106.     AVCodec *codec;
3107. 

ffmpeg.c:3108:9: Taking false branch
3106.     AVCodec *codec;
3107. 
3108.     if(!name)
              ^
3109.         return CODEC_ID_NONE;
3110.     codec = encoder ?

ffmpeg.c:3110:13: Condition is true
3108.     if(!name)
3109.         return CODEC_ID_NONE;
3110.     codec = encoder ?
                  ^
3111.         avcodec_find_encoder_by_name(name) :
3112.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3110:5: 
3108.     if(!name)
3109.         return CODEC_ID_NONE;
3110.     codec = encoder ?
          ^
3111.         avcodec_find_encoder_by_name(name) :
3112.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3113:9: Taking true branch
3111.         avcodec_find_encoder_by_name(name) :
3112.         avcodec_find_decoder_by_name(name);
3113.     if(!codec) {
              ^
3114.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3115.         ffmpeg_exit(1);

ffmpeg.c:3114:9: 
3112.         avcodec_find_decoder_by_name(name);
3113.     if(!codec) {
3114.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3115.         ffmpeg_exit(1);
3116.     }

ffmpeg.c:3115:9: Skipping ffmpeg_exit(): empty list of specs
3113.     if(!codec) {
3114.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3115.         ffmpeg_exit(1);
              ^
3116.     }
3117.     if(codec->type != type) {

ffmpeg.c:3117:8: 
3115.         ffmpeg_exit(1);
3116.     }
3117.     if(codec->type != type) {
             ^
3118.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3119.         ffmpeg_exit(1);
