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

ffmpeg.c:2834:1: start of procedure find_codec_or_die()
2832. }
2833. 
2834. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2835. {
2836.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2836:32: Condition is true
2834. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2835. {
2836.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2837.     AVCodec *codec;
2838. 

ffmpeg.c:2836:5: 
2834. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2835. {
2836.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2837.     AVCodec *codec;
2838. 

ffmpeg.c:2839:9: Taking false branch
2837.     AVCodec *codec;
2838. 
2839.     if(!name)
              ^
2840.         return CODEC_ID_NONE;
2841.     codec = encoder ?

ffmpeg.c:2841:13: Condition is true
2839.     if(!name)
2840.         return CODEC_ID_NONE;
2841.     codec = encoder ?
                  ^
2842.         avcodec_find_encoder_by_name(name) :
2843.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2841:5: 
2839.     if(!name)
2840.         return CODEC_ID_NONE;
2841.     codec = encoder ?
          ^
2842.         avcodec_find_encoder_by_name(name) :
2843.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2844:9: Taking true branch
2842.         avcodec_find_encoder_by_name(name) :
2843.         avcodec_find_decoder_by_name(name);
2844.     if(!codec) {
              ^
2845.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2846.         av_exit(1);

ffmpeg.c:2845:9: 
2843.         avcodec_find_decoder_by_name(name);
2844.     if(!codec) {
2845.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2846.         av_exit(1);
2847.     }

ffmpeg.c:2846:9: Skipping av_exit(): empty list of specs
2844.     if(!codec) {
2845.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2846.         av_exit(1);
              ^
2847.     }
2848.     if(codec->type != type) {

ffmpeg.c:2848:8: 
2846.         av_exit(1);
2847.     }
2848.     if(codec->type != type) {
             ^
2849.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2850.         av_exit(1);
