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

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

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

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

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

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

ffmpeg.c:2919:5: 
2917.     if(!name)
2918.         return CODEC_ID_NONE;
2919.     codec = encoder ?
          ^
2920.         avcodec_find_encoder_by_name(name) :
2921.         avcodec_find_decoder_by_name(name);

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

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

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

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