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

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

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

ffmpeg.c:2942:5: 
2940. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
2941. {
2942.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2943.     AVCodec *codec;
2944. 

ffmpeg.c:2945:9: Taking false branch
2943.     AVCodec *codec;
2944. 
2945.     if(!name)
              ^
2946.         return CODEC_ID_NONE;
2947.     codec = encoder ?

ffmpeg.c:2947:13: Condition is true
2945.     if(!name)
2946.         return CODEC_ID_NONE;
2947.     codec = encoder ?
                  ^
2948.         avcodec_find_encoder_by_name(name) :
2949.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2947:5: 
2945.     if(!name)
2946.         return CODEC_ID_NONE;
2947.     codec = encoder ?
          ^
2948.         avcodec_find_encoder_by_name(name) :
2949.         avcodec_find_decoder_by_name(name);

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

ffmpeg.c:2951:9: 
2949.         avcodec_find_decoder_by_name(name);
2950.     if(!codec) {
2951.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2952.         ffmpeg_exit(1);
2953.     }

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

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