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

ffmpeg.c:2830:1: start of procedure find_codec_or_die()
2828. }
2829. 
2830. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2831. {
2832.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2832:32: Condition is true
2830. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2831. {
2832.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2833.     AVCodec *codec;
2834. 

ffmpeg.c:2832:5: 
2830. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2831. {
2832.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2833.     AVCodec *codec;
2834. 

ffmpeg.c:2835:9: Taking false branch
2833.     AVCodec *codec;
2834. 
2835.     if(!name)
              ^
2836.         return CODEC_ID_NONE;
2837.     codec = encoder ?

ffmpeg.c:2837:13: Condition is true
2835.     if(!name)
2836.         return CODEC_ID_NONE;
2837.     codec = encoder ?
                  ^
2838.         avcodec_find_encoder_by_name(name) :
2839.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2837:5: 
2835.     if(!name)
2836.         return CODEC_ID_NONE;
2837.     codec = encoder ?
          ^
2838.         avcodec_find_encoder_by_name(name) :
2839.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2840:9: Taking true branch
2838.         avcodec_find_encoder_by_name(name) :
2839.         avcodec_find_decoder_by_name(name);
2840.     if(!codec) {
              ^
2841.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2842.         av_exit(1);

ffmpeg.c:2841:9: 
2839.         avcodec_find_decoder_by_name(name);
2840.     if(!codec) {
2841.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2842.         av_exit(1);
2843.     }

ffmpeg.c:2842:9: Skipping av_exit(): empty list of specs
2840.     if(!codec) {
2841.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2842.         av_exit(1);
              ^
2843.     }
2844.     if(codec->type != type) {

ffmpeg.c:2844:8: 
2842.         av_exit(1);
2843.     }
2844.     if(codec->type != type) {
             ^
2845.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2846.         av_exit(1);
