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

ffmpeg.c:3036:1: start of procedure find_codec_or_die()
3034. }
3035. 
3036. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
      ^
3037. {
3038.     const char *codec_string = encoder ? "encoder" : "decoder";

ffmpeg.c:3038:32: Condition is true
3036. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3037. {
3038.     const char *codec_string = encoder ? "encoder" : "decoder";
                                     ^
3039.     AVCodec *codec;
3040. 

ffmpeg.c:3038:5: 
3036. static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
3037. {
3038.     const char *codec_string = encoder ? "encoder" : "decoder";
          ^
3039.     AVCodec *codec;
3040. 

ffmpeg.c:3041:9: Taking false branch
3039.     AVCodec *codec;
3040. 
3041.     if(!name)
              ^
3042.         return CODEC_ID_NONE;
3043.     codec = encoder ?

ffmpeg.c:3043:13: Condition is true
3041.     if(!name)
3042.         return CODEC_ID_NONE;
3043.     codec = encoder ?
                  ^
3044.         avcodec_find_encoder_by_name(name) :
3045.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3043:5: 
3041.     if(!name)
3042.         return CODEC_ID_NONE;
3043.     codec = encoder ?
          ^
3044.         avcodec_find_encoder_by_name(name) :
3045.         avcodec_find_decoder_by_name(name);

ffmpeg.c:3046:9: Taking true branch
3044.         avcodec_find_encoder_by_name(name) :
3045.         avcodec_find_decoder_by_name(name);
3046.     if(!codec) {
              ^
3047.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3048.         ffmpeg_exit(1);

ffmpeg.c:3047:9: 
3045.         avcodec_find_decoder_by_name(name);
3046.     if(!codec) {
3047.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
              ^
3048.         ffmpeg_exit(1);
3049.     }

ffmpeg.c:3048:9: Skipping ffmpeg_exit(): empty list of specs
3046.     if(!codec) {
3047.         fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);
3048.         ffmpeg_exit(1);
              ^
3049.     }
3050.     if(codec->type != type) {

ffmpeg.c:3050:8: 
3048.         ffmpeg_exit(1);
3049.     }
3050.     if(codec->type != type) {
             ^
3051.         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
3052.         ffmpeg_exit(1);
