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

ffmpeg.c:2693:1: start of procedure find_codec_or_die()
2691. }
2692. 
2693. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
      ^
2694. {
2695.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:2695:32: Condition is true
2693. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2694. {
2695.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
2696.     AVCodec *codec;
2697. 

ffmpeg.c:2695:5: 
2693. static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
2694. {
2695.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
2696.     AVCodec *codec;
2697. 

ffmpeg.c:2698:9: Taking false branch
2696.     AVCodec *codec;
2697. 
2698.     if(!name)
              ^
2699.         return CODEC_ID_NONE;
2700.     codec = encoder ?

ffmpeg.c:2700:13: Condition is true
2698.     if(!name)
2699.         return CODEC_ID_NONE;
2700.     codec = encoder ?
                  ^
2701.         avcodec_find_encoder_by_name(name) :
2702.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2700:5: 
2698.     if(!name)
2699.         return CODEC_ID_NONE;
2700.     codec = encoder ?
          ^
2701.         avcodec_find_encoder_by_name(name) :
2702.         avcodec_find_decoder_by_name(name);

ffmpeg.c:2703:9: Taking true branch
2701.         avcodec_find_encoder_by_name(name) :
2702.         avcodec_find_decoder_by_name(name);
2703.     if(!codec) {
              ^
2704.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2705.         av_exit(1);

ffmpeg.c:2704:9: Skipping av_log(): empty list of specs
2702.         avcodec_find_decoder_by_name(name);
2703.     if(!codec) {
2704.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
              ^
2705.         av_exit(1);
2706.     }

ffmpeg.c:2705:9: Skipping av_exit(): empty list of specs
2703.     if(!codec) {
2704.         av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
2705.         av_exit(1);
              ^
2706.     }
2707.     if(codec->type != type) {

ffmpeg.c:2707:8: 
2705.         av_exit(1);
2706.     }
2707.     if(codec->type != type) {
             ^
2708.         av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
2709.         av_exit(1);
