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

ffmpeg.c:2823:1: start of procedure find_codec_or_die()
2821. }
2822. 
2823. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2824. {
2825.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2825:32: Condition is true
2823. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2824. {
2825.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2826.     AVCodec *codec;
2827. 

ffmpeg.c:2825:5: 
2823. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2824. {
2825.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2826.     AVCodec *codec;
2827. 

ffmpeg.c:2828:9: Taking false branch
2826.     AVCodec *codec;
2827. 
2828.     if(!name)
              ^
2829.         return CODEC_ID_NONE;
2830.     codec = encoder ?

ffmpeg.c:2830:13: Condition is true
2828.     if(!name)
2829.         return CODEC_ID_NONE;
2830.     codec = encoder ?
                  ^
2831.         avcodec_find_encoder_by_name(name) :
2832.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2830:5: 
2828.     if(!name)
2829.         return CODEC_ID_NONE;
2830.     codec = encoder ?
          ^
2831.         avcodec_find_encoder_by_name(name) :
2832.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2833:9: Taking true branch
2831.         avcodec_find_encoder_by_name(name) :
2832.         avcodec_find_decoder_by_name(name);
2833.     if(!codec) {
              ^
2834.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2835.         av_exit(1);

ffmpeg.c:2834:9: 
2832.         avcodec_find_decoder_by_name(name);
2833.     if(!codec) {
2834.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2835.         av_exit(1);
2836.     }

ffmpeg.c:2835:9: Skipping av_exit(): empty list of specs
2833.     if(!codec) {
2834.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2835.         av_exit(1);
              ^
2836.     }
2837.     if(codec->type != type) {

ffmpeg.c:2837:8: 
2835.         av_exit(1);
2836.     }
2837.     if(codec->type != type) {
             ^
2838.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2839.         av_exit(1);
