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

ffmpeg.c:2930:1: start of procedure find_codec_or_die()
2928. }
2929. 
2930. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
2931. {
2932.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2932:32: Condition is true
2930. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
2931. {
2932.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2933.     AVCodec *codec;
2934. 

ffmpeg.c:2932:5: 
2930. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
2931. {
2932.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2933.     AVCodec *codec;
2934. 

ffmpeg.c:2935:9: Taking false branch
2933.     AVCodec *codec;
2934. 
2935.     if(!name)
              ^
2936.         return CODEC_ID_NONE;
2937.     codec = encoder ?

ffmpeg.c:2937:13: Condition is true
2935.     if(!name)
2936.         return CODEC_ID_NONE;
2937.     codec = encoder ?
                  ^
2938.         avcodec_find_encoder_by_name(name) :
2939.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2937:5: 
2935.     if(!name)
2936.         return CODEC_ID_NONE;
2937.     codec = encoder ?
          ^
2938.         avcodec_find_encoder_by_name(name) :
2939.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2940:9: Taking true branch
2938.         avcodec_find_encoder_by_name(name) :
2939.         avcodec_find_decoder_by_name(name);
2940.     if(!codec) {
              ^
2941.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2942.         ffmpeg_exit(1);

ffmpeg.c:2941:9: 
2939.         avcodec_find_decoder_by_name(name);
2940.     if(!codec) {
2941.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2942.         ffmpeg_exit(1);
2943.     }

ffmpeg.c:2942:9: Skipping ffmpeg_exit(): empty list of specs
2940.     if(!codec) {
2941.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2942.         ffmpeg_exit(1);
              ^
2943.     }
2944.     if(codec->type != type) {

ffmpeg.c:2944:8: 
2942.         ffmpeg_exit(1);
2943.     }
2944.     if(codec->type != type) {
             ^
2945.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2946.         ffmpeg_exit(1);
