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

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

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

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

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

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

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

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

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

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

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