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

ffmpeg.c:3139:1: start of procedure find_codec_or_die()
3137. }
3138. 
3139. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
3140. {
3141.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3141:32: Condition is true
3139. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
3140. {
3141.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3142.     AVCodec *codec;
3143. 

ffmpeg.c:3141:5: 
3139. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
3140. {
3141.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3142.     AVCodec *codec;
3143. 

ffmpeg.c:3144:9: Taking false branch
3142.     AVCodec *codec;
3143. 
3144.     if(!name)
              ^
3145.         return CODEC_ID_NONE;
3146.     codec = encoder ?

ffmpeg.c:3146:13: Condition is true
3144.     if(!name)
3145.         return CODEC_ID_NONE;
3146.     codec = encoder ?
                  ^
3147.         avcodec_find_encoder_by_name(name) :
3148.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3146:5: 
3144.     if(!name)
3145.         return CODEC_ID_NONE;
3146.     codec = encoder ?
          ^
3147.         avcodec_find_encoder_by_name(name) :
3148.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3149:9: Taking true branch
3147.         avcodec_find_encoder_by_name(name) :
3148.         avcodec_find_decoder_by_name(name);
3149.     if(!codec) {
              ^
3150.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3151.         ffmpeg_exit(1);

ffmpeg.c:3150:9: 
3148.         avcodec_find_decoder_by_name(name);
3149.     if(!codec) {
3150.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3151.         ffmpeg_exit(1);
3152.     }

ffmpeg.c:3151:9: Skipping ffmpeg_exit(): empty list of specs
3149.     if(!codec) {
3150.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3151.         ffmpeg_exit(1);
              ^
3152.     }
3153.     if(codec->type != type) {

ffmpeg.c:3153:8: 
3151.         ffmpeg_exit(1);
3152.     }
3153.     if(codec->type != type) {
             ^
3154.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3155.         ffmpeg_exit(1);
