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

ffmpeg.c:2767:1: start of procedure find_codec_or_die()
2765. }
2766. 
2767. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2768. {
2769.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2769:32: Condition is true
2767. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2768. {
2769.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2770.     AVCodec *codec;
2771. 

ffmpeg.c:2769:5: 
2767. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2768. {
2769.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2770.     AVCodec *codec;
2771. 

ffmpeg.c:2772:9: Taking false branch
2770.     AVCodec *codec;
2771. 
2772.     if(!name)
              ^
2773.         return CODEC_ID_NONE;
2774.     codec = encoder ?

ffmpeg.c:2774:13: Condition is true
2772.     if(!name)
2773.         return CODEC_ID_NONE;
2774.     codec = encoder ?
                  ^
2775.         avcodec_find_encoder_by_name(name) :
2776.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2774:5: 
2772.     if(!name)
2773.         return CODEC_ID_NONE;
2774.     codec = encoder ?
          ^
2775.         avcodec_find_encoder_by_name(name) :
2776.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2777:9: Taking true branch
2775.         avcodec_find_encoder_by_name(name) :
2776.         avcodec_find_decoder_by_name(name);
2777.     if(!codec) {
              ^
2778.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2779.         av_exit(1);

ffmpeg.c:2778:9: 
2776.         avcodec_find_decoder_by_name(name);
2777.     if(!codec) {
2778.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2779.         av_exit(1);
2780.     }

ffmpeg.c:2779:9: Skipping av_exit(): empty list of specs
2777.     if(!codec) {
2778.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2779.         av_exit(1);
              ^
2780.     }
2781.     if(codec->type != type) {

ffmpeg.c:2781:8: 
2779.         av_exit(1);
2780.     }
2781.     if(codec->type != type) {
             ^
2782.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2783.         av_exit(1);
