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

ffmpeg.c:2733:1: start of procedure find_codec_or_die()
2731. }
2732. 
2733. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2734. {
2735.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2735:32: Condition is true
2733. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2734. {
2735.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2736.     AVCodec *codec;
2737. 

ffmpeg.c:2735:5: 
2733. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2734. {
2735.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2736.     AVCodec *codec;
2737. 

ffmpeg.c:2738:9: Taking false branch
2736.     AVCodec *codec;
2737. 
2738.     if(!name)
              ^
2739.         return CODEC_ID_NONE;
2740.     codec = encoder ?

ffmpeg.c:2740:13: Condition is true
2738.     if(!name)
2739.         return CODEC_ID_NONE;
2740.     codec = encoder ?
                  ^
2741.         avcodec_find_encoder_by_name(name) :
2742.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2740:5: 
2738.     if(!name)
2739.         return CODEC_ID_NONE;
2740.     codec = encoder ?
          ^
2741.         avcodec_find_encoder_by_name(name) :
2742.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2743:9: Taking true branch
2741.         avcodec_find_encoder_by_name(name) :
2742.         avcodec_find_decoder_by_name(name);
2743.     if(!codec) {
              ^
2744.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2745.         av_exit(1);

ffmpeg.c:2744:9: 
2742.         avcodec_find_decoder_by_name(name);
2743.     if(!codec) {
2744.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2745.         av_exit(1);
2746.     }

ffmpeg.c:2745:9: Skipping av_exit(): empty list of specs
2743.     if(!codec) {
2744.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2745.         av_exit(1);
              ^
2746.     }
2747.     if(codec->type != type) {

ffmpeg.c:2747:8: 
2745.         av_exit(1);
2746.     }
2747.     if(codec->type != type) {
             ^
2748.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2749.         av_exit(1);
