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

ffmpeg.c:2915:1: start of procedure find_codec_or_die()
2913. }
2914. 
2915. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2916. {
2917.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2917:32: Condition is true
2915. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2916. {
2917.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2918.     AVCodec *codec;
2919. 

ffmpeg.c:2917:5: 
2915. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2916. {
2917.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2918.     AVCodec *codec;
2919. 

ffmpeg.c:2920:9: Taking false branch
2918.     AVCodec *codec;
2919. 
2920.     if(!name)
              ^
2921.         return CODEC_ID_NONE;
2922.     codec = encoder ?

ffmpeg.c:2922:13: Condition is true
2920.     if(!name)
2921.         return CODEC_ID_NONE;
2922.     codec = encoder ?
                  ^
2923.         avcodec_find_encoder_by_name(name) :
2924.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2922:5: 
2920.     if(!name)
2921.         return CODEC_ID_NONE;
2922.     codec = encoder ?
          ^
2923.         avcodec_find_encoder_by_name(name) :
2924.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2925:9: Taking true branch
2923.         avcodec_find_encoder_by_name(name) :
2924.         avcodec_find_decoder_by_name(name);
2925.     if(!codec) {
              ^
2926.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2927.         av_exit(1);

ffmpeg.c:2926:9: 
2924.         avcodec_find_decoder_by_name(name);
2925.     if(!codec) {
2926.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2927.         av_exit(1);
2928.     }

ffmpeg.c:2927:9: Skipping av_exit(): empty list of specs
2925.     if(!codec) {
2926.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2927.         av_exit(1);
              ^
2928.     }
2929.     if(codec->type != type) {

ffmpeg.c:2929:8: 
2927.         av_exit(1);
2928.     }
2929.     if(codec->type != type) {
             ^
2930.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2931.         av_exit(1);
