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

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

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

ffmpeg.c:3126:5: 
3124. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3125. {
3126.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3127.     AVCodec *codec;
3128. 

ffmpeg.c:3129:9: Taking false branch
3127.     AVCodec *codec;
3128. 
3129.     if(!name)
              ^
3130.         return CODEC_ID_NONE;
3131.     codec = encoder ?

ffmpeg.c:3131:13: Condition is true
3129.     if(!name)
3130.         return CODEC_ID_NONE;
3131.     codec = encoder ?
                  ^
3132.         avcodec_find_encoder_by_name(name) :
3133.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3131:5: 
3129.     if(!name)
3130.         return CODEC_ID_NONE;
3131.     codec = encoder ?
          ^
3132.         avcodec_find_encoder_by_name(name) :
3133.         avcodec_find_decoder_by_name(name);

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

ffmpeg.c:3135:9: 
3133.         avcodec_find_decoder_by_name(name);
3134.     if(!codec) {
3135.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3136.         ffmpeg_exit(1);
3137.     }

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

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