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

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

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

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

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

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

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

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

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

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

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