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

avconv.c:2955:1: start of procedure copy_metadata()
2953. }
2954. 
2955. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
      ^
2956. {
2957.     AVDictionary **meta_in = NULL;

avconv.c:2957:5: 
2955. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
2956. {
2957.     AVDictionary **meta_in = NULL;
          ^
2958.     AVDictionary **meta_out;
2959.     int i, ret = 0;

avconv.c:2959:5: 
2957.     AVDictionary **meta_in = NULL;
2958.     AVDictionary **meta_out;
2959.     int i, ret = 0;
          ^
2960.     char type_in, type_out;
2961.     const char *istream_spec = NULL, *ostream_spec = NULL;

avconv.c:2961:5: 
2959.     int i, ret = 0;
2960.     char type_in, type_out;
2961.     const char *istream_spec = NULL, *ostream_spec = NULL;
          ^
2962.     int idx_in = 0, idx_out = 0;
2963. 

avconv.c:2962:5: 
2960.     char type_in, type_out;
2961.     const char *istream_spec = NULL, *ostream_spec = NULL;
2962.     int idx_in = 0, idx_out = 0;
          ^
2963. 
2964.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);

avconv.c:2964:5: 
2962.     int idx_in = 0, idx_out = 0;
2963. 
2964.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
          ^
2965.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2966. 

avconv.c:2928:1: start of procedure parse_meta_type()
  2926.  * @param stream_spec for type s, the stream specifier is written here
  2927.  */
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2929. {
  2930.     if (*arg) {

avconv.c:2930:9: Taking true branch
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2929. {
  2930.     if (*arg) {
                ^
  2931.         *type = *arg;
  2932.         switch (*arg) {

avconv.c:2931:9: 
  2929. {
  2930.     if (*arg) {
  2931.         *type = *arg;
                ^
  2932.         switch (*arg) {
  2933.         case 'g':

avconv.c:2932:9: 
  2930.     if (*arg) {
  2931.         *type = *arg;
  2932.         switch (*arg) {
                ^
  2933.         case 'g':
  2934.             break;

avconv.c:2933:9: Switch condition is false. Skipping switch case
  2931.         *type = *arg;
  2932.         switch (*arg) {
  2933.         case 'g':
                ^
  2934.             break;
  2935.         case 's':

avconv.c:2935:9: Switch condition is false. Skipping switch case
  2933.         case 'g':
  2934.             break;
  2935.         case 's':
                ^
  2936.             if (*(++arg) && *arg != ':') {
  2937.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2942:9: Switch condition is false. Skipping switch case
  2940.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2941.             break;
  2942.         case 'c':
                ^
  2943.         case 'p':
  2944.             if (*(++arg) == ':')

avconv.c:2943:9: Switch condition is false. Skipping switch case
  2941.             break;
  2942.         case 'c':
  2943.         case 'p':
                ^
  2944.             if (*(++arg) == ':')
  2945.                 *index = strtol(++arg, NULL, 0);

avconv.c:2948:13: Skipping av_log(): empty list of specs
  2946.             break;
  2947.         default:
  2948.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2949.             exit_program(1);
  2950.         }

avconv.c:2949:13: Skipping exit_program(): empty list of specs
  2947.         default:
  2948.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2949.             exit_program(1);
                    ^
  2950.         }
  2951.     } else

avconv.c:2930:5: 
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2929. {
  2930.     if (*arg) {
            ^
  2931.         *type = *arg;
  2932.         switch (*arg) {

avconv.c:2953:1: return from a call to parse_meta_type
  2951.     } else
  2952.         *type = 'g';
  2953. }
        ^
  2954. 
  2955. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2965:5: 
2963. 
2964.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
2965.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
          ^
2966. 
2967.     if (type_in == 'g' || type_out == 'g')

avconv.c:2928:1: start of procedure parse_meta_type()
  2926.  * @param stream_spec for type s, the stream specifier is written here
  2927.  */
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2929. {
  2930.     if (*arg) {

avconv.c:2930:9: Taking true branch
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2929. {
  2930.     if (*arg) {
                ^
  2931.         *type = *arg;
  2932.         switch (*arg) {

avconv.c:2931:9: 
  2929. {
  2930.     if (*arg) {
  2931.         *type = *arg;
                ^
  2932.         switch (*arg) {
  2933.         case 'g':

avconv.c:2932:9: 
  2930.     if (*arg) {
  2931.         *type = *arg;
  2932.         switch (*arg) {
                ^
  2933.         case 'g':
  2934.             break;

avconv.c:2933:9: Switch condition is false. Skipping switch case
  2931.         *type = *arg;
  2932.         switch (*arg) {
  2933.         case 'g':
                ^
  2934.             break;
  2935.         case 's':

avconv.c:2935:9: Switch condition is false. Skipping switch case
  2933.         case 'g':
  2934.             break;
  2935.         case 's':
                ^
  2936.             if (*(++arg) && *arg != ':') {
  2937.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2942:9: Switch condition is false. Skipping switch case
  2940.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2941.             break;
  2942.         case 'c':
                ^
  2943.         case 'p':
  2944.             if (*(++arg) == ':')

avconv.c:2943:9: Switch condition is false. Skipping switch case
  2941.             break;
  2942.         case 'c':
  2943.         case 'p':
                ^
  2944.             if (*(++arg) == ':')
  2945.                 *index = strtol(++arg, NULL, 0);

avconv.c:2948:13: Skipping av_log(): empty list of specs
  2946.             break;
  2947.         default:
  2948.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2949.             exit_program(1);
  2950.         }

avconv.c:2949:13: Skipping exit_program(): empty list of specs
  2947.         default:
  2948.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2949.             exit_program(1);
                    ^
  2950.         }
  2951.     } else

avconv.c:2930:5: 
  2928. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2929. {
  2930.     if (*arg) {
            ^
  2931.         *type = *arg;
  2932.         switch (*arg) {

avconv.c:2953:1: return from a call to parse_meta_type
  2951.     } else
  2952.         *type = 'g';
  2953. }
        ^
  2954. 
  2955. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2967:9: Taking false branch
2965.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2966. 
2967.     if (type_in == 'g' || type_out == 'g')
              ^
2968.         o->metadata_global_manual = 1;
2969.     if (type_in == 's' || type_out == 's')

avconv.c:2967:27: Taking false branch
2965.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2966. 
2967.     if (type_in == 'g' || type_out == 'g')
                                ^
2968.         o->metadata_global_manual = 1;
2969.     if (type_in == 's' || type_out == 's')

avconv.c:2969:9: Taking false branch
2967.     if (type_in == 'g' || type_out == 'g')
2968.         o->metadata_global_manual = 1;
2969.     if (type_in == 's' || type_out == 's')
              ^
2970.         o->metadata_streams_manual = 1;
2971.     if (type_in == 'c' || type_out == 'c')

avconv.c:2969:27: Taking false branch
2967.     if (type_in == 'g' || type_out == 'g')
2968.         o->metadata_global_manual = 1;
2969.     if (type_in == 's' || type_out == 's')
                                ^
2970.         o->metadata_streams_manual = 1;
2971.     if (type_in == 'c' || type_out == 'c')

avconv.c:2971:9: Taking false branch
2969.     if (type_in == 's' || type_out == 's')
2970.         o->metadata_streams_manual = 1;
2971.     if (type_in == 'c' || type_out == 'c')
              ^
2972.         o->metadata_chapters_manual = 1;
2973. 

avconv.c:2971:27: Taking false branch
2969.     if (type_in == 's' || type_out == 's')
2970.         o->metadata_streams_manual = 1;
2971.     if (type_in == 'c' || type_out == 'c')
                                ^
2972.         o->metadata_chapters_manual = 1;
2973. 

avconv.c:2996:5: Switch condition is false. Skipping switch case
2994.         }\
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
2998. 

avconv.c:2996:5: Switch condition is false. Skipping switch case
2994.         }\
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
2998. 

avconv.c:2996:5: Switch condition is false. Skipping switch case
2994.         }\
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
2998. 

avconv.c:2997:5: Switch condition is false. Skipping switch case
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
2998. 
2999.     /* for input streams choose first matching stream */

avconv.c:2997:5: Switch condition is false. Skipping switch case
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
2998. 
2999.     /* for input streams choose first matching stream */

avconv.c:2997:5: Switch condition is false. Skipping switch case
2995. 
2996.     SET_DICT(type_in, meta_in, ic, idx_in);
2997.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
2998. 
2999.     /* for input streams choose first matching stream */

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

avconv.c:3014:9: Taking false branch
3012.     }
3013. 
3014.     if (type_out == 's') {
              ^
3015.         for (i = 0; i < oc->nb_streams; i++) {
3016.             if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) {

avconv.c:3023:9: 
3021.         }
3022.     } else
3023.         av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE);
              ^
3024. 
3025.     return 0;
