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

ffmpeg.c:2715:1: start of procedure find_codec_or_die()
2713. }
2714. 
2715. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2716. {
2717.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2717:32: Condition is true
2715. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2716. {
2717.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2718.     AVCodec *codec;
2719. 

ffmpeg.c:2717:5: 
2715. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2716. {
2717.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2718.     AVCodec *codec;
2719. 

ffmpeg.c:2720:9: Taking false branch
2718.     AVCodec *codec;
2719. 
2720.     if(!name)
              ^
2721.         return CODEC_ID_NONE;
2722.     codec = encoder ?

ffmpeg.c:2722:13: Condition is true
2720.     if(!name)
2721.         return CODEC_ID_NONE;
2722.     codec = encoder ?
                  ^
2723.         avcodec_find_encoder_by_name(name) :
2724.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2722:5: 
2720.     if(!name)
2721.         return CODEC_ID_NONE;
2722.     codec = encoder ?
          ^
2723.         avcodec_find_encoder_by_name(name) :
2724.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2725:9: Taking true branch
2723.         avcodec_find_encoder_by_name(name) :
2724.         avcodec_find_decoder_by_name(name);
2725.     if(!codec) {
              ^
2726.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2727.         av_exit(1);

ffmpeg.c:2726:9: Skipping av_log(): empty list of specs
2724.         avcodec_find_decoder_by_name(name);
2725.     if(!codec) {
2726.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2727.         av_exit(1);
2728.     }

ffmpeg.c:2727:9: Skipping av_exit(): empty list of specs
2725.     if(!codec) {
2726.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2727.         av_exit(1);
              ^
2728.     }
2729.     if(codec->type != type) {

ffmpeg.c:2729:8: 
2727.         av_exit(1);
2728.     }
2729.     if(codec->type != type) {
             ^
2730.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2731.         av_exit(1);
