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

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

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

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

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

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

ffmpeg.c:3123:5: 
3121.     if(!name)
3122.         return CODEC_ID_NONE;
3123.     codec = encoder ?
          ^
3124.         avcodec_find_encoder_by_name(name) :
3125.         avcodec_find_decoder_by_name(name);

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

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

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

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