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

ffmpeg.c:3106:1: start of procedure find_codec_or_die()
3104. }
3105. 
3106. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3107. {
3108.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3108:32: Condition is true
3106. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3107. {
3108.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3109.     AVCodec *codec;
3110. 

ffmpeg.c:3108:5: 
3106. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3107. {
3108.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3109.     AVCodec *codec;
3110. 

ffmpeg.c:3111:9: Taking false branch
3109.     AVCodec *codec;
3110. 
3111.     if(!name)
              ^
3112.         return CODEC_ID_NONE;
3113.     codec = encoder ?

ffmpeg.c:3113:13: Condition is true
3111.     if(!name)
3112.         return CODEC_ID_NONE;
3113.     codec = encoder ?
                  ^
3114.         avcodec_find_encoder_by_name(name) :
3115.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3113:5: 
3111.     if(!name)
3112.         return CODEC_ID_NONE;
3113.     codec = encoder ?
          ^
3114.         avcodec_find_encoder_by_name(name) :
3115.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3116:9: Taking true branch
3114.         avcodec_find_encoder_by_name(name) :
3115.         avcodec_find_decoder_by_name(name);
3116.     if(!codec) {
              ^
3117.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3118.         ffmpeg_exit(1);

ffmpeg.c:3117:9: 
3115.         avcodec_find_decoder_by_name(name);
3116.     if(!codec) {
3117.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3118.         ffmpeg_exit(1);
3119.     }

ffmpeg.c:3118:9: Skipping ffmpeg_exit(): empty list of specs
3116.     if(!codec) {
3117.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3118.         ffmpeg_exit(1);
              ^
3119.     }
3120.     if(codec->type != type) {

ffmpeg.c:3120:8: 
3118.         ffmpeg_exit(1);
3119.     }
3120.     if(codec->type != type) {
             ^
3121.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3122.         ffmpeg_exit(1);
