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

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

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

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

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

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

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

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

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

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

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