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

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

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

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

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

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

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

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

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

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

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