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

avconv.c:2974:1: start of procedure copy_metadata()
2972. }
2973. 
2974. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
      ^
2975. {
2976.     AVDictionary **meta_in = NULL;

avconv.c:2976:5: 
2974. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
2975. {
2976.     AVDictionary **meta_in = NULL;
          ^
2977.     AVDictionary **meta_out;
2978.     int i, ret = 0;

avconv.c:2978:5: 
2976.     AVDictionary **meta_in = NULL;
2977.     AVDictionary **meta_out;
2978.     int i, ret = 0;
          ^
2979.     char type_in, type_out;
2980.     const char *istream_spec = NULL, *ostream_spec = NULL;

avconv.c:2980:5: 
2978.     int i, ret = 0;
2979.     char type_in, type_out;
2980.     const char *istream_spec = NULL, *ostream_spec = NULL;
          ^
2981.     int idx_in = 0, idx_out = 0;
2982. 

avconv.c:2981:5: 
2979.     char type_in, type_out;
2980.     const char *istream_spec = NULL, *ostream_spec = NULL;
2981.     int idx_in = 0, idx_out = 0;
          ^
2982. 
2983.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);

avconv.c:2983:5: 
2981.     int idx_in = 0, idx_out = 0;
2982. 
2983.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
          ^
2984.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2985. 

avconv.c:2947:1: start of procedure parse_meta_type()
  2945.  * @param stream_spec for type s, the stream specifier is written here
  2946.  */
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2948. {
  2949.     if (*arg) {

avconv.c:2949:9: Taking true branch
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2948. {
  2949.     if (*arg) {
                ^
  2950.         *type = *arg;
  2951.         switch (*arg) {

avconv.c:2950:9: 
  2948. {
  2949.     if (*arg) {
  2950.         *type = *arg;
                ^
  2951.         switch (*arg) {
  2952.         case 'g':

avconv.c:2951:9: 
  2949.     if (*arg) {
  2950.         *type = *arg;
  2951.         switch (*arg) {
                ^
  2952.         case 'g':
  2953.             break;

avconv.c:2952:9: Switch condition is false. Skipping switch case
  2950.         *type = *arg;
  2951.         switch (*arg) {
  2952.         case 'g':
                ^
  2953.             break;
  2954.         case 's':

avconv.c:2954:9: Switch condition is false. Skipping switch case
  2952.         case 'g':
  2953.             break;
  2954.         case 's':
                ^
  2955.             if (*(++arg) && *arg != ':') {
  2956.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2961:9: Switch condition is false. Skipping switch case
  2959.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2960.             break;
  2961.         case 'c':
                ^
  2962.         case 'p':
  2963.             if (*(++arg) == ':')

avconv.c:2962:9: Switch condition is false. Skipping switch case
  2960.             break;
  2961.         case 'c':
  2962.         case 'p':
                ^
  2963.             if (*(++arg) == ':')
  2964.                 *index = strtol(++arg, NULL, 0);

avconv.c:2967:13: Skipping av_log(): empty list of specs
  2965.             break;
  2966.         default:
  2967.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2968.             exit_program(1);
  2969.         }

avconv.c:2968:13: Skipping exit_program(): empty list of specs
  2966.         default:
  2967.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2968.             exit_program(1);
                    ^
  2969.         }
  2970.     } else

avconv.c:2949:5: 
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2948. {
  2949.     if (*arg) {
            ^
  2950.         *type = *arg;
  2951.         switch (*arg) {

avconv.c:2972:1: return from a call to parse_meta_type
  2970.     } else
  2971.         *type = 'g';
  2972. }
        ^
  2973. 
  2974. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2984:5: 
2982. 
2983.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
2984.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
          ^
2985. 
2986.     if (type_in == 'g' || type_out == 'g')

avconv.c:2947:1: start of procedure parse_meta_type()
  2945.  * @param stream_spec for type s, the stream specifier is written here
  2946.  */
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2948. {
  2949.     if (*arg) {

avconv.c:2949:9: Taking true branch
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2948. {
  2949.     if (*arg) {
                ^
  2950.         *type = *arg;
  2951.         switch (*arg) {

avconv.c:2950:9: 
  2948. {
  2949.     if (*arg) {
  2950.         *type = *arg;
                ^
  2951.         switch (*arg) {
  2952.         case 'g':

avconv.c:2951:9: 
  2949.     if (*arg) {
  2950.         *type = *arg;
  2951.         switch (*arg) {
                ^
  2952.         case 'g':
  2953.             break;

avconv.c:2952:9: Switch condition is false. Skipping switch case
  2950.         *type = *arg;
  2951.         switch (*arg) {
  2952.         case 'g':
                ^
  2953.             break;
  2954.         case 's':

avconv.c:2954:9: Switch condition is false. Skipping switch case
  2952.         case 'g':
  2953.             break;
  2954.         case 's':
                ^
  2955.             if (*(++arg) && *arg != ':') {
  2956.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2961:9: Switch condition is false. Skipping switch case
  2959.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2960.             break;
  2961.         case 'c':
                ^
  2962.         case 'p':
  2963.             if (*(++arg) == ':')

avconv.c:2962:9: Switch condition is false. Skipping switch case
  2960.             break;
  2961.         case 'c':
  2962.         case 'p':
                ^
  2963.             if (*(++arg) == ':')
  2964.                 *index = strtol(++arg, NULL, 0);

avconv.c:2967:13: Skipping av_log(): empty list of specs
  2965.             break;
  2966.         default:
  2967.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2968.             exit_program(1);
  2969.         }

avconv.c:2968:13: Skipping exit_program(): empty list of specs
  2966.         default:
  2967.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2968.             exit_program(1);
                    ^
  2969.         }
  2970.     } else

avconv.c:2949:5: 
  2947. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2948. {
  2949.     if (*arg) {
            ^
  2950.         *type = *arg;
  2951.         switch (*arg) {

avconv.c:2972:1: return from a call to parse_meta_type
  2970.     } else
  2971.         *type = 'g';
  2972. }
        ^
  2973. 
  2974. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2986:9: Taking false branch
2984.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2985. 
2986.     if (type_in == 'g' || type_out == 'g')
              ^
2987.         o->metadata_global_manual = 1;
2988.     if (type_in == 's' || type_out == 's')

avconv.c:2986:27: Taking false branch
2984.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2985. 
2986.     if (type_in == 'g' || type_out == 'g')
                                ^
2987.         o->metadata_global_manual = 1;
2988.     if (type_in == 's' || type_out == 's')

avconv.c:2988:9: Taking false branch
2986.     if (type_in == 'g' || type_out == 'g')
2987.         o->metadata_global_manual = 1;
2988.     if (type_in == 's' || type_out == 's')
              ^
2989.         o->metadata_streams_manual = 1;
2990.     if (type_in == 'c' || type_out == 'c')

avconv.c:2988:27: Taking false branch
2986.     if (type_in == 'g' || type_out == 'g')
2987.         o->metadata_global_manual = 1;
2988.     if (type_in == 's' || type_out == 's')
                                ^
2989.         o->metadata_streams_manual = 1;
2990.     if (type_in == 'c' || type_out == 'c')

avconv.c:2990:9: Taking false branch
2988.     if (type_in == 's' || type_out == 's')
2989.         o->metadata_streams_manual = 1;
2990.     if (type_in == 'c' || type_out == 'c')
              ^
2991.         o->metadata_chapters_manual = 1;
2992. 

avconv.c:2990:27: Taking false branch
2988.     if (type_in == 's' || type_out == 's')
2989.         o->metadata_streams_manual = 1;
2990.     if (type_in == 'c' || type_out == 'c')
                                ^
2991.         o->metadata_chapters_manual = 1;
2992. 

avconv.c:3015:5: Switch condition is false. Skipping switch case
3013.         }\
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
3017. 

avconv.c:3015:5: Switch condition is false. Skipping switch case
3013.         }\
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
3017. 

avconv.c:3015:5: Switch condition is false. Skipping switch case
3013.         }\
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
3017. 

avconv.c:3016:5: Switch condition is false. Skipping switch case
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3017. 
3018.     /* for input streams choose first matching stream */

avconv.c:3016:5: Switch condition is false. Skipping switch case
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3017. 
3018.     /* for input streams choose first matching stream */

avconv.c:3016:5: Switch condition is false. Skipping switch case
3014. 
3015.     SET_DICT(type_in, meta_in, ic, idx_in);
3016.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3017. 
3018.     /* for input streams choose first matching stream */

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

avconv.c:3033:9: Taking false branch
3031.     }
3032. 
3033.     if (type_out == 's') {
              ^
3034.         for (i = 0; i < oc->nb_streams; i++) {
3035.             if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) {

avconv.c:3042:9: 
3040.         }
3041.     } else
3042.         av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE);
              ^
3043. 
3044.     return 0;
