avconv.c:3066: error: Null Dereference
  pointer `meta_in` last assigned on line 3000 could be null and is dereferenced at line 3066, column 32.

avconv.c:2998:1: start of procedure copy_metadata()
2996. }
2997. 
2998. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
      ^
2999. {
3000.     AVDictionary **meta_in = NULL;

avconv.c:3000:5: 
2998. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
2999. {
3000.     AVDictionary **meta_in = NULL;
          ^
3001.     AVDictionary **meta_out;
3002.     int i, ret = 0;

avconv.c:3002:5: 
3000.     AVDictionary **meta_in = NULL;
3001.     AVDictionary **meta_out;
3002.     int i, ret = 0;
          ^
3003.     char type_in, type_out;
3004.     const char *istream_spec = NULL, *ostream_spec = NULL;

avconv.c:3004:5: 
3002.     int i, ret = 0;
3003.     char type_in, type_out;
3004.     const char *istream_spec = NULL, *ostream_spec = NULL;
          ^
3005.     int idx_in = 0, idx_out = 0;
3006. 

avconv.c:3005:5: 
3003.     char type_in, type_out;
3004.     const char *istream_spec = NULL, *ostream_spec = NULL;
3005.     int idx_in = 0, idx_out = 0;
          ^
3006. 
3007.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);

avconv.c:3007:5: 
3005.     int idx_in = 0, idx_out = 0;
3006. 
3007.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
          ^
3008.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3009. 

avconv.c:2971:1: start of procedure parse_meta_type()
  2969.  * @param stream_spec for type s, the stream specifier is written here
  2970.  */
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2972. {
  2973.     if (*arg) {

avconv.c:2973:9: Taking true branch
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2972. {
  2973.     if (*arg) {
                ^
  2974.         *type = *arg;
  2975.         switch (*arg) {

avconv.c:2974:9: 
  2972. {
  2973.     if (*arg) {
  2974.         *type = *arg;
                ^
  2975.         switch (*arg) {
  2976.         case 'g':

avconv.c:2975:9: 
  2973.     if (*arg) {
  2974.         *type = *arg;
  2975.         switch (*arg) {
                ^
  2976.         case 'g':
  2977.             break;

avconv.c:2976:9: Switch condition is false. Skipping switch case
  2974.         *type = *arg;
  2975.         switch (*arg) {
  2976.         case 'g':
                ^
  2977.             break;
  2978.         case 's':

avconv.c:2978:9: Switch condition is false. Skipping switch case
  2976.         case 'g':
  2977.             break;
  2978.         case 's':
                ^
  2979.             if (*(++arg) && *arg != ':') {
  2980.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2985:9: Switch condition is false. Skipping switch case
  2983.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2984.             break;
  2985.         case 'c':
                ^
  2986.         case 'p':
  2987.             if (*(++arg) == ':')

avconv.c:2986:9: Switch condition is false. Skipping switch case
  2984.             break;
  2985.         case 'c':
  2986.         case 'p':
                ^
  2987.             if (*(++arg) == ':')
  2988.                 *index = strtol(++arg, NULL, 0);

avconv.c:2991:13: Skipping av_log(): empty list of specs
  2989.             break;
  2990.         default:
  2991.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2992.             exit_program(1);
  2993.         }

avconv.c:2992:13: Skipping exit_program(): empty list of specs
  2990.         default:
  2991.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2992.             exit_program(1);
                    ^
  2993.         }
  2994.     } else

avconv.c:2973:5: 
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2972. {
  2973.     if (*arg) {
            ^
  2974.         *type = *arg;
  2975.         switch (*arg) {

avconv.c:2996:1: return from a call to parse_meta_type
  2994.     } else
  2995.         *type = 'g';
  2996. }
        ^
  2997. 
  2998. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:3008:5: 
3006. 
3007.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
3008.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
          ^
3009. 
3010.     if (type_in == 'g' || type_out == 'g')

avconv.c:2971:1: start of procedure parse_meta_type()
  2969.  * @param stream_spec for type s, the stream specifier is written here
  2970.  */
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2972. {
  2973.     if (*arg) {

avconv.c:2973:9: Taking true branch
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2972. {
  2973.     if (*arg) {
                ^
  2974.         *type = *arg;
  2975.         switch (*arg) {

avconv.c:2974:9: 
  2972. {
  2973.     if (*arg) {
  2974.         *type = *arg;
                ^
  2975.         switch (*arg) {
  2976.         case 'g':

avconv.c:2975:9: 
  2973.     if (*arg) {
  2974.         *type = *arg;
  2975.         switch (*arg) {
                ^
  2976.         case 'g':
  2977.             break;

avconv.c:2976:9: Switch condition is false. Skipping switch case
  2974.         *type = *arg;
  2975.         switch (*arg) {
  2976.         case 'g':
                ^
  2977.             break;
  2978.         case 's':

avconv.c:2978:9: Switch condition is false. Skipping switch case
  2976.         case 'g':
  2977.             break;
  2978.         case 's':
                ^
  2979.             if (*(++arg) && *arg != ':') {
  2980.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2985:9: Switch condition is false. Skipping switch case
  2983.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2984.             break;
  2985.         case 'c':
                ^
  2986.         case 'p':
  2987.             if (*(++arg) == ':')

avconv.c:2986:9: Switch condition is false. Skipping switch case
  2984.             break;
  2985.         case 'c':
  2986.         case 'p':
                ^
  2987.             if (*(++arg) == ':')
  2988.                 *index = strtol(++arg, NULL, 0);

avconv.c:2991:13: Skipping av_log(): empty list of specs
  2989.             break;
  2990.         default:
  2991.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2992.             exit_program(1);
  2993.         }

avconv.c:2992:13: Skipping exit_program(): empty list of specs
  2990.         default:
  2991.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2992.             exit_program(1);
                    ^
  2993.         }
  2994.     } else

avconv.c:2973:5: 
  2971. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2972. {
  2973.     if (*arg) {
            ^
  2974.         *type = *arg;
  2975.         switch (*arg) {

avconv.c:2996:1: return from a call to parse_meta_type
  2994.     } else
  2995.         *type = 'g';
  2996. }
        ^
  2997. 
  2998. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:3010:9: Taking false branch
3008.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3009. 
3010.     if (type_in == 'g' || type_out == 'g')
              ^
3011.         o->metadata_global_manual = 1;
3012.     if (type_in == 's' || type_out == 's')

avconv.c:3010:27: Taking false branch
3008.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3009. 
3010.     if (type_in == 'g' || type_out == 'g')
                                ^
3011.         o->metadata_global_manual = 1;
3012.     if (type_in == 's' || type_out == 's')

avconv.c:3012:9: Taking false branch
3010.     if (type_in == 'g' || type_out == 'g')
3011.         o->metadata_global_manual = 1;
3012.     if (type_in == 's' || type_out == 's')
              ^
3013.         o->metadata_streams_manual = 1;
3014.     if (type_in == 'c' || type_out == 'c')

avconv.c:3012:27: Taking false branch
3010.     if (type_in == 'g' || type_out == 'g')
3011.         o->metadata_global_manual = 1;
3012.     if (type_in == 's' || type_out == 's')
                                ^
3013.         o->metadata_streams_manual = 1;
3014.     if (type_in == 'c' || type_out == 'c')

avconv.c:3014:9: Taking false branch
3012.     if (type_in == 's' || type_out == 's')
3013.         o->metadata_streams_manual = 1;
3014.     if (type_in == 'c' || type_out == 'c')
              ^
3015.         o->metadata_chapters_manual = 1;
3016. 

avconv.c:3014:27: Taking false branch
3012.     if (type_in == 's' || type_out == 's')
3013.         o->metadata_streams_manual = 1;
3014.     if (type_in == 'c' || type_out == 'c')
                                ^
3015.         o->metadata_chapters_manual = 1;
3016. 

avconv.c:3039:5: Switch condition is false. Skipping switch case
3037.         }\
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
3041. 

avconv.c:3039:5: Switch condition is false. Skipping switch case
3037.         }\
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
3041. 

avconv.c:3039:5: Switch condition is false. Skipping switch case
3037.         }\
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
3041. 

avconv.c:3040:5: Switch condition is false. Skipping switch case
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3041. 
3042.     /* for input streams choose first matching stream */

avconv.c:3040:5: Switch condition is false. Skipping switch case
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3041. 
3042.     /* for input streams choose first matching stream */

avconv.c:3040:5: Switch condition is false. Skipping switch case
3038. 
3039.     SET_DICT(type_in, meta_in, ic, idx_in);
3040.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3041. 
3042.     /* for input streams choose first matching stream */

avconv.c:3043:9: Taking false branch
3041. 
3042.     /* for input streams choose first matching stream */
3043.     if (type_in == 's') {
              ^
3044.         for (i = 0; i < ic->nb_streams; i++) {
3045.             if ((ret = check_stream_specifier(ic, ic->streams[i], istream_spec)) > 0) {

avconv.c:3057:9: Taking false branch
3055.     }
3056. 
3057.     if (type_out == 's') {
              ^
3058.         for (i = 0; i < oc->nb_streams; i++) {
3059.             if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) {

avconv.c:3066:9: 
3064.         }
3065.     } else
3066.         av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE);
              ^
3067. 
3068.     return 0;
