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

ffmpeg.c:3037:1: start of procedure find_codec_or_die()
3035. }
3036. 
3037. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3038. {
3039.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3039:32: Condition is true
3037. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3038. {
3039.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3040.     AVCodec *codec;
3041. 

ffmpeg.c:3039:5: 
3037. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3038. {
3039.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3040.     AVCodec *codec;
3041. 

ffmpeg.c:3042:9: Taking false branch
3040.     AVCodec *codec;
3041. 
3042.     if(!name)
              ^
3043.         return CODEC_ID_NONE;
3044.     codec = encoder ?

ffmpeg.c:3044:13: Condition is true
3042.     if(!name)
3043.         return CODEC_ID_NONE;
3044.     codec = encoder ?
                  ^
3045.         avcodec_find_encoder_by_name(name) :
3046.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3044:5: 
3042.     if(!name)
3043.         return CODEC_ID_NONE;
3044.     codec = encoder ?
          ^
3045.         avcodec_find_encoder_by_name(name) :
3046.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3047:9: Taking true branch
3045.         avcodec_find_encoder_by_name(name) :
3046.         avcodec_find_decoder_by_name(name);
3047.     if(!codec) {
              ^
3048.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3049.         ffmpeg_exit(1);

ffmpeg.c:3048:9: 
3046.         avcodec_find_decoder_by_name(name);
3047.     if(!codec) {
3048.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3049.         ffmpeg_exit(1);
3050.     }

ffmpeg.c:3049:9: Skipping ffmpeg_exit(): empty list of specs
3047.     if(!codec) {
3048.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3049.         ffmpeg_exit(1);
              ^
3050.     }
3051.     if(codec->type != type) {

ffmpeg.c:3051:8: 
3049.         ffmpeg_exit(1);
3050.     }
3051.     if(codec->type != type) {
             ^
3052.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3053.         ffmpeg_exit(1);
