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

ffmpeg.c:3045:1: start of procedure find_codec_or_die()
3043. }
3044. 
3045. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3046. {
3047.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3047:32: Condition is true
3045. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3046. {
3047.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3048.     AVCodec *codec;
3049. 

ffmpeg.c:3047:5: 
3045. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3046. {
3047.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3048.     AVCodec *codec;
3049. 

ffmpeg.c:3050:9: Taking false branch
3048.     AVCodec *codec;
3049. 
3050.     if(!name)
              ^
3051.         return CODEC_ID_NONE;
3052.     codec = encoder ?

ffmpeg.c:3052:13: Condition is true
3050.     if(!name)
3051.         return CODEC_ID_NONE;
3052.     codec = encoder ?
                  ^
3053.         avcodec_find_encoder_by_name(name) :
3054.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3052:5: 
3050.     if(!name)
3051.         return CODEC_ID_NONE;
3052.     codec = encoder ?
          ^
3053.         avcodec_find_encoder_by_name(name) :
3054.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3055:9: Taking true branch
3053.         avcodec_find_encoder_by_name(name) :
3054.         avcodec_find_decoder_by_name(name);
3055.     if(!codec) {
              ^
3056.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3057.         ffmpeg_exit(1);

ffmpeg.c:3056:9: 
3054.         avcodec_find_decoder_by_name(name);
3055.     if(!codec) {
3056.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3057.         ffmpeg_exit(1);
3058.     }

ffmpeg.c:3057:9: Skipping ffmpeg_exit(): empty list of specs
3055.     if(!codec) {
3056.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3057.         ffmpeg_exit(1);
              ^
3058.     }
3059.     if(codec->type != type) {

ffmpeg.c:3059:8: 
3057.         ffmpeg_exit(1);
3058.     }
3059.     if(codec->type != type) {
             ^
3060.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3061.         ffmpeg_exit(1);
