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

ffmpeg.c:3120:1: start of procedure find_codec_or_die()
3118. }
3119. 
3120. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3121. {
3122.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3122:32: Condition is true
3120. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3121. {
3122.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3123.     AVCodec *codec;
3124. 

ffmpeg.c:3122:5: 
3120. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3121. {
3122.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3123.     AVCodec *codec;
3124. 

ffmpeg.c:3125:9: Taking false branch
3123.     AVCodec *codec;
3124. 
3125.     if(!name)
              ^
3126.         return CODEC_ID_NONE;
3127.     codec = encoder ?

ffmpeg.c:3127:13: Condition is true
3125.     if(!name)
3126.         return CODEC_ID_NONE;
3127.     codec = encoder ?
                  ^
3128.         avcodec_find_encoder_by_name(name) :
3129.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3127:5: 
3125.     if(!name)
3126.         return CODEC_ID_NONE;
3127.     codec = encoder ?
          ^
3128.         avcodec_find_encoder_by_name(name) :
3129.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3130:9: Taking true branch
3128.         avcodec_find_encoder_by_name(name) :
3129.         avcodec_find_decoder_by_name(name);
3130.     if(!codec) {
              ^
3131.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3132.         ffmpeg_exit(1);

ffmpeg.c:3131:9: 
3129.         avcodec_find_decoder_by_name(name);
3130.     if(!codec) {
3131.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3132.         ffmpeg_exit(1);
3133.     }

ffmpeg.c:3132:9: Skipping ffmpeg_exit(): empty list of specs
3130.     if(!codec) {
3131.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3132.         ffmpeg_exit(1);
              ^
3133.     }
3134.     if(codec->type != type) {

ffmpeg.c:3134:8: 
3132.         ffmpeg_exit(1);
3133.     }
3134.     if(codec->type != type) {
             ^
3135.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3136.         ffmpeg_exit(1);
