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

ffmpeg.c:3080:1: start of procedure find_codec_or_die()
3078. }
3079. 
3080. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3081. {
3082.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3082:32: Condition is true
3080. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3081. {
3082.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3083.     AVCodec *codec;
3084. 

ffmpeg.c:3082:5: 
3080. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3081. {
3082.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3083.     AVCodec *codec;
3084. 

ffmpeg.c:3085:9: Taking false branch
3083.     AVCodec *codec;
3084. 
3085.     if(!name)
              ^
3086.         return CODEC_ID_NONE;
3087.     codec = encoder ?

ffmpeg.c:3087:13: Condition is true
3085.     if(!name)
3086.         return CODEC_ID_NONE;
3087.     codec = encoder ?
                  ^
3088.         avcodec_find_encoder_by_name(name) :
3089.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3087:5: 
3085.     if(!name)
3086.         return CODEC_ID_NONE;
3087.     codec = encoder ?
          ^
3088.         avcodec_find_encoder_by_name(name) :
3089.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3090:9: Taking true branch
3088.         avcodec_find_encoder_by_name(name) :
3089.         avcodec_find_decoder_by_name(name);
3090.     if(!codec) {
              ^
3091.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3092.         ffmpeg_exit(1);

ffmpeg.c:3091:9: 
3089.         avcodec_find_decoder_by_name(name);
3090.     if(!codec) {
3091.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3092.         ffmpeg_exit(1);
3093.     }

ffmpeg.c:3092:9: Skipping ffmpeg_exit(): empty list of specs
3090.     if(!codec) {
3091.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3092.         ffmpeg_exit(1);
              ^
3093.     }
3094.     if(codec->type != type) {

ffmpeg.c:3094:8: 
3092.         ffmpeg_exit(1);
3093.     }
3094.     if(codec->type != type) {
             ^
3095.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3096.         ffmpeg_exit(1);
