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

ffmpeg.c:2816:1: start of procedure find_codec_or_die()
2814. }
2815. 
2816. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2817. {
2818.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2818:32: Condition is true
2816. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2817. {
2818.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2819.     AVCodec *codec;
2820. 

ffmpeg.c:2818:5: 
2816. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2817. {
2818.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2819.     AVCodec *codec;
2820. 

ffmpeg.c:2821:9: Taking false branch
2819.     AVCodec *codec;
2820. 
2821.     if(!name)
              ^
2822.         return CODEC_ID_NONE;
2823.     codec = encoder ?

ffmpeg.c:2823:13: Condition is true
2821.     if(!name)
2822.         return CODEC_ID_NONE;
2823.     codec = encoder ?
                  ^
2824.         avcodec_find_encoder_by_name(name) :
2825.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2823:5: 
2821.     if(!name)
2822.         return CODEC_ID_NONE;
2823.     codec = encoder ?
          ^
2824.         avcodec_find_encoder_by_name(name) :
2825.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2826:9: Taking true branch
2824.         avcodec_find_encoder_by_name(name) :
2825.         avcodec_find_decoder_by_name(name);
2826.     if(!codec) {
              ^
2827.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2828.         av_exit(1);

ffmpeg.c:2827:9: 
2825.         avcodec_find_decoder_by_name(name);
2826.     if(!codec) {
2827.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2828.         av_exit(1);
2829.     }

ffmpeg.c:2828:9: Skipping av_exit(): empty list of specs
2826.     if(!codec) {
2827.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2828.         av_exit(1);
              ^
2829.     }
2830.     if(codec->type != type) {

ffmpeg.c:2830:8: 
2828.         av_exit(1);
2829.     }
2830.     if(codec->type != type) {
             ^
2831.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2832.         av_exit(1);
