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

ffmpeg.c:2666:1: start of procedure find_codec_or_die()
2664. }
2665. 
2666. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2667. {
2668.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2668:32: Condition is true
2666. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2667. {
2668.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2669.     AVCodec *codec;
2670. 

ffmpeg.c:2668:5: 
2666. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2667. {
2668.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2669.     AVCodec *codec;
2670. 

ffmpeg.c:2671:9: Taking false branch
2669.     AVCodec *codec;
2670. 
2671.     if(!name)
              ^
2672.         return CODEC_ID_NONE;
2673.     codec = encoder ?

ffmpeg.c:2673:13: Condition is true
2671.     if(!name)
2672.         return CODEC_ID_NONE;
2673.     codec = encoder ?
                  ^
2674.         avcodec_find_encoder_by_name(name) :
2675.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2673:5: 
2671.     if(!name)
2672.         return CODEC_ID_NONE;
2673.     codec = encoder ?
          ^
2674.         avcodec_find_encoder_by_name(name) :
2675.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2676:9: Taking true branch
2674.         avcodec_find_encoder_by_name(name) :
2675.         avcodec_find_decoder_by_name(name);
2676.     if(!codec) {
              ^
2677.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2678.         av_exit(1);

ffmpeg.c:2677:9: Skipping av_log(): empty list of specs
2675.         avcodec_find_decoder_by_name(name);
2676.     if(!codec) {
2677.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2678.         av_exit(1);
2679.     }

ffmpeg.c:2678:9: Skipping av_exit(): empty list of specs
2676.     if(!codec) {
2677.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2678.         av_exit(1);
              ^
2679.     }
2680.     if(codec->type != type) {

ffmpeg.c:2680:8: 
2678.         av_exit(1);
2679.     }
2680.     if(codec->type != type) {
             ^
2681.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2682.         av_exit(1);
