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

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

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

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

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

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

ffmpeg.c:3049:5: 
3047.     if(!name)
3048.         return CODEC_ID_NONE;
3049.     codec = encoder ?
          ^
3050.         avcodec_find_encoder_by_name(name) :
3051.         avcodec_find_decoder_by_name(name);

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

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

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

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