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

ffmpeg.c:2778:1: start of procedure find_codec_or_die()
2776. }
2777. 
2778. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2779. {
2780.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2780:32: Condition is true
2778. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2779. {
2780.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2781.     AVCodec *codec;
2782. 

ffmpeg.c:2780:5: 
2778. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2779. {
2780.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2781.     AVCodec *codec;
2782. 

ffmpeg.c:2783:9: Taking false branch
2781.     AVCodec *codec;
2782. 
2783.     if(!name)
              ^
2784.         return CODEC_ID_NONE;
2785.     codec = encoder ?

ffmpeg.c:2785:13: Condition is true
2783.     if(!name)
2784.         return CODEC_ID_NONE;
2785.     codec = encoder ?
                  ^
2786.         avcodec_find_encoder_by_name(name) :
2787.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2785:5: 
2783.     if(!name)
2784.         return CODEC_ID_NONE;
2785.     codec = encoder ?
          ^
2786.         avcodec_find_encoder_by_name(name) :
2787.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2788:9: Taking true branch
2786.         avcodec_find_encoder_by_name(name) :
2787.         avcodec_find_decoder_by_name(name);
2788.     if(!codec) {
              ^
2789.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2790.         av_exit(1);

ffmpeg.c:2789:9: 
2787.         avcodec_find_decoder_by_name(name);
2788.     if(!codec) {
2789.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
2790.         av_exit(1);
2791.     }

ffmpeg.c:2790:9: Skipping av_exit(): empty list of specs
2788.     if(!codec) {
2789.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
2790.         av_exit(1);
              ^
2791.     }
2792.     if(codec->type != type) {

ffmpeg.c:2792:8: 
2790.         av_exit(1);
2791.     }
2792.     if(codec->type != type) {
             ^
2793.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
2794.         av_exit(1);
