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

ffmpeg.c:3071:1: start of procedure find_codec_or_die()
3069. }
3070. 
3071. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3072. {
3073.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3073:32: Condition is true
3071. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3072. {
3073.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3074.     AVCodec *codec;
3075. 

ffmpeg.c:3073:5: 
3071. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3072. {
3073.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3074.     AVCodec *codec;
3075. 

ffmpeg.c:3076:9: Taking false branch
3074.     AVCodec *codec;
3075. 
3076.     if(!name)
              ^
3077.         return CODEC_ID_NONE;
3078.     codec = encoder ?

ffmpeg.c:3078:13: Condition is true
3076.     if(!name)
3077.         return CODEC_ID_NONE;
3078.     codec = encoder ?
                  ^
3079.         avcodec_find_encoder_by_name(name) :
3080.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3078:5: 
3076.     if(!name)
3077.         return CODEC_ID_NONE;
3078.     codec = encoder ?
          ^
3079.         avcodec_find_encoder_by_name(name) :
3080.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3081:9: Taking true branch
3079.         avcodec_find_encoder_by_name(name) :
3080.         avcodec_find_decoder_by_name(name);
3081.     if(!codec) {
              ^
3082.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3083.         av_exit(1);

ffmpeg.c:3082:9: 
3080.         avcodec_find_decoder_by_name(name);
3081.     if(!codec) {
3082.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3083.         av_exit(1);
3084.     }

ffmpeg.c:3083:9: Skipping av_exit(): empty list of specs
3081.     if(!codec) {
3082.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3083.         av_exit(1);
              ^
3084.     }
3085.     if(codec->type != type) {

ffmpeg.c:3085:8: 
3083.         av_exit(1);
3084.     }
3085.     if(codec->type != type) {
             ^
3086.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3087.         av_exit(1);
