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

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

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

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

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

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

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

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

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

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

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