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

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

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

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

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

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

ffmpeg.c:2756:5: 
2754.     if(!name)
2755.         return CODEC_ID_NONE;
2756.     codec = encoder ?
          ^
2757.         avcodec_find_encoder_by_name(name) :
2758.         avcodec_find_decoder_by_name(name);

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

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

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

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