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

ffmpeg.c:3113:1: start of procedure find_codec_or_die()
3111. }
3112. 
3113. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3114. {
3115.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3115:32: Condition is true
3113. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3114. {
3115.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3116.     AVCodec *codec;
3117. 

ffmpeg.c:3115:5: 
3113. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3114. {
3115.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3116.     AVCodec *codec;
3117. 

ffmpeg.c:3118:9: Taking false branch
3116.     AVCodec *codec;
3117. 
3118.     if(!name)
              ^
3119.         return CODEC_ID_NONE;
3120.     codec = encoder ?

ffmpeg.c:3120:13: Condition is true
3118.     if(!name)
3119.         return CODEC_ID_NONE;
3120.     codec = encoder ?
                  ^
3121.         avcodec_find_encoder_by_name(name) :
3122.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3120:5: 
3118.     if(!name)
3119.         return CODEC_ID_NONE;
3120.     codec = encoder ?
          ^
3121.         avcodec_find_encoder_by_name(name) :
3122.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3123:9: Taking true branch
3121.         avcodec_find_encoder_by_name(name) :
3122.         avcodec_find_decoder_by_name(name);
3123.     if(!codec) {
              ^
3124.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3125.         ffmpeg_exit(1);

ffmpeg.c:3124:9: 
3122.         avcodec_find_decoder_by_name(name);
3123.     if(!codec) {
3124.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3125.         ffmpeg_exit(1);
3126.     }

ffmpeg.c:3125:9: Skipping ffmpeg_exit(): empty list of specs
3123.     if(!codec) {
3124.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3125.         ffmpeg_exit(1);
              ^
3126.     }
3127.     if(codec->type != type) {

ffmpeg.c:3127:8: 
3125.         ffmpeg_exit(1);
3126.     }
3127.     if(codec->type != type) {
             ^
3128.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3129.         ffmpeg_exit(1);
