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

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

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

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

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

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

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

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

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

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

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