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

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

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

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

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

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

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

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

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

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

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