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

ffmpeg.c:2944:1: start of procedure find_codec_or_die()
2942. }
2943. 
2944. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
2945. {
2946.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2946:32: Condition is true
2944. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
2945. {
2946.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2947.     AVCodec *codec;
2948. 

ffmpeg.c:2946:5: 
2944. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
2945. {
2946.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2947.     AVCodec *codec;
2948. 

ffmpeg.c:2949:9: Taking false branch
2947.     AVCodec *codec;
2948. 
2949.     if(!name)
              ^
2950.         return CODEC_ID_NONE;
2951.     codec = encoder ?

ffmpeg.c:2951:13: Condition is true
2949.     if(!name)
2950.         return CODEC_ID_NONE;
2951.     codec = encoder ?
                  ^
2952.         avcodec_find_encoder_by_name(name) :
2953.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2951:5: 
2949.     if(!name)
2950.         return CODEC_ID_NONE;
2951.     codec = encoder ?
          ^
2952.         avcodec_find_encoder_by_name(name) :
2953.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2954:9: Taking true branch
2952.         avcodec_find_encoder_by_name(name) :
2953.         avcodec_find_decoder_by_name(name);
2954.     if(!codec) {
              ^
2955.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2956.         ffmpeg_exit(1);

ffmpeg.c:2955:9: 
2953.         avcodec_find_decoder_by_name(name);
2954.     if(!codec) {
2955.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2956.         ffmpeg_exit(1);
2957.     }

ffmpeg.c:2956:9: Skipping ffmpeg_exit(): empty list of specs
2954.     if(!codec) {
2955.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2956.         ffmpeg_exit(1);
              ^
2957.     }
2958.     if(codec->type != type) {

ffmpeg.c:2958:8: 
2956.         ffmpeg_exit(1);
2957.     }
2958.     if(codec->type != type) {
             ^
2959.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2960.         ffmpeg_exit(1);
