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

ffmpeg.c:2752:1: start of procedure find_codec_or_die()
2750. }
2751. 
2752. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2753. {
2754.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2754:32: Condition is true
2752. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2753. {
2754.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2755.     AVCodec *codec;
2756. 

ffmpeg.c:2754:5: 
2752. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2753. {
2754.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2755.     AVCodec *codec;
2756. 

ffmpeg.c:2757:9: Taking false branch
2755.     AVCodec *codec;
2756. 
2757.     if(!name)
              ^
2758.         return CODEC_ID_NONE;
2759.     codec = encoder ?

ffmpeg.c:2759:13: Condition is true
2757.     if(!name)
2758.         return CODEC_ID_NONE;
2759.     codec = encoder ?
                  ^
2760.         avcodec_find_encoder_by_name(name) :
2761.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2759:5: 
2757.     if(!name)
2758.         return CODEC_ID_NONE;
2759.     codec = encoder ?
          ^
2760.         avcodec_find_encoder_by_name(name) :
2761.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2762:9: Taking true branch
2760.         avcodec_find_encoder_by_name(name) :
2761.         avcodec_find_decoder_by_name(name);
2762.     if(!codec) {
              ^
2763.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2764.         av_exit(1);

ffmpeg.c:2763:9: 
2761.         avcodec_find_decoder_by_name(name);
2762.     if(!codec) {
2763.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2764.         av_exit(1);
2765.     }

ffmpeg.c:2764:9: Skipping av_exit(): empty list of specs
2762.     if(!codec) {
2763.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2764.         av_exit(1);
              ^
2765.     }
2766.     if(codec->type != type) {

ffmpeg.c:2766:8: 
2764.         av_exit(1);
2765.     }
2766.     if(codec->type != type) {
             ^
2767.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2768.         av_exit(1);
