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

avconv.c:2964:1: start of procedure copy_metadata()
2962. }
2963. 
2964. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
      ^
2965. {
2966.     AVDictionary **meta_in = NULL;

avconv.c:2966:5: 
2964. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
2965. {
2966.     AVDictionary **meta_in = NULL;
          ^
2967.     AVDictionary **meta_out;
2968.     int i, ret = 0;

avconv.c:2968:5: 
2966.     AVDictionary **meta_in = NULL;
2967.     AVDictionary **meta_out;
2968.     int i, ret = 0;
          ^
2969.     char type_in, type_out;
2970.     const char *istream_spec = NULL, *ostream_spec = NULL;

avconv.c:2970:5: 
2968.     int i, ret = 0;
2969.     char type_in, type_out;
2970.     const char *istream_spec = NULL, *ostream_spec = NULL;
          ^
2971.     int idx_in = 0, idx_out = 0;
2972. 

avconv.c:2971:5: 
2969.     char type_in, type_out;
2970.     const char *istream_spec = NULL, *ostream_spec = NULL;
2971.     int idx_in = 0, idx_out = 0;
          ^
2972. 
2973.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);

avconv.c:2973:5: 
2971.     int idx_in = 0, idx_out = 0;
2972. 
2973.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
          ^
2974.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2975. 

avconv.c:2937:1: start of procedure parse_meta_type()
  2935.  * @param stream_spec for type s, the stream specifier is written here
  2936.  */
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2938. {
  2939.     if (*arg) {

avconv.c:2939:9: Taking true branch
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2938. {
  2939.     if (*arg) {
                ^
  2940.         *type = *arg;
  2941.         switch (*arg) {

avconv.c:2940:9: 
  2938. {
  2939.     if (*arg) {
  2940.         *type = *arg;
                ^
  2941.         switch (*arg) {
  2942.         case 'g':

avconv.c:2941:9: 
  2939.     if (*arg) {
  2940.         *type = *arg;
  2941.         switch (*arg) {
                ^
  2942.         case 'g':
  2943.             break;

avconv.c:2942:9: Switch condition is false. Skipping switch case
  2940.         *type = *arg;
  2941.         switch (*arg) {
  2942.         case 'g':
                ^
  2943.             break;
  2944.         case 's':

avconv.c:2944:9: Switch condition is false. Skipping switch case
  2942.         case 'g':
  2943.             break;
  2944.         case 's':
                ^
  2945.             if (*(++arg) && *arg != ':') {
  2946.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2951:9: Switch condition is false. Skipping switch case
  2949.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2950.             break;
  2951.         case 'c':
                ^
  2952.         case 'p':
  2953.             if (*(++arg) == ':')

avconv.c:2952:9: Switch condition is false. Skipping switch case
  2950.             break;
  2951.         case 'c':
  2952.         case 'p':
                ^
  2953.             if (*(++arg) == ':')
  2954.                 *index = strtol(++arg, NULL, 0);

avconv.c:2957:13: Skipping av_log(): empty list of specs
  2955.             break;
  2956.         default:
  2957.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2958.             exit_program(1);
  2959.         }

avconv.c:2958:13: Skipping exit_program(): empty list of specs
  2956.         default:
  2957.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2958.             exit_program(1);
                    ^
  2959.         }
  2960.     } else

avconv.c:2939:5: 
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2938. {
  2939.     if (*arg) {
            ^
  2940.         *type = *arg;
  2941.         switch (*arg) {

avconv.c:2962:1: return from a call to parse_meta_type
  2960.     } else
  2961.         *type = 'g';
  2962. }
        ^
  2963. 
  2964. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2974:5: 
2972. 
2973.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
2974.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
          ^
2975. 
2976.     if (type_in == 'g' || type_out == 'g')

avconv.c:2937:1: start of procedure parse_meta_type()
  2935.  * @param stream_spec for type s, the stream specifier is written here
  2936.  */
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2938. {
  2939.     if (*arg) {

avconv.c:2939:9: Taking true branch
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2938. {
  2939.     if (*arg) {
                ^
  2940.         *type = *arg;
  2941.         switch (*arg) {

avconv.c:2940:9: 
  2938. {
  2939.     if (*arg) {
  2940.         *type = *arg;
                ^
  2941.         switch (*arg) {
  2942.         case 'g':

avconv.c:2941:9: 
  2939.     if (*arg) {
  2940.         *type = *arg;
  2941.         switch (*arg) {
                ^
  2942.         case 'g':
  2943.             break;

avconv.c:2942:9: Switch condition is false. Skipping switch case
  2940.         *type = *arg;
  2941.         switch (*arg) {
  2942.         case 'g':
                ^
  2943.             break;
  2944.         case 's':

avconv.c:2944:9: Switch condition is false. Skipping switch case
  2942.         case 'g':
  2943.             break;
  2944.         case 's':
                ^
  2945.             if (*(++arg) && *arg != ':') {
  2946.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2951:9: Switch condition is false. Skipping switch case
  2949.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2950.             break;
  2951.         case 'c':
                ^
  2952.         case 'p':
  2953.             if (*(++arg) == ':')

avconv.c:2952:9: Switch condition is false. Skipping switch case
  2950.             break;
  2951.         case 'c':
  2952.         case 'p':
                ^
  2953.             if (*(++arg) == ':')
  2954.                 *index = strtol(++arg, NULL, 0);

avconv.c:2957:13: Skipping av_log(): empty list of specs
  2955.             break;
  2956.         default:
  2957.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2958.             exit_program(1);
  2959.         }

avconv.c:2958:13: Skipping exit_program(): empty list of specs
  2956.         default:
  2957.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2958.             exit_program(1);
                    ^
  2959.         }
  2960.     } else

avconv.c:2939:5: 
  2937. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2938. {
  2939.     if (*arg) {
            ^
  2940.         *type = *arg;
  2941.         switch (*arg) {

avconv.c:2962:1: return from a call to parse_meta_type
  2960.     } else
  2961.         *type = 'g';
  2962. }
        ^
  2963. 
  2964. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:2976:9: Taking false branch
2974.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2975. 
2976.     if (type_in == 'g' || type_out == 'g')
              ^
2977.         o->metadata_global_manual = 1;
2978.     if (type_in == 's' || type_out == 's')

avconv.c:2976:27: Taking false branch
2974.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
2975. 
2976.     if (type_in == 'g' || type_out == 'g')
                                ^
2977.         o->metadata_global_manual = 1;
2978.     if (type_in == 's' || type_out == 's')

avconv.c:2978:9: Taking false branch
2976.     if (type_in == 'g' || type_out == 'g')
2977.         o->metadata_global_manual = 1;
2978.     if (type_in == 's' || type_out == 's')
              ^
2979.         o->metadata_streams_manual = 1;
2980.     if (type_in == 'c' || type_out == 'c')

avconv.c:2978:27: Taking false branch
2976.     if (type_in == 'g' || type_out == 'g')
2977.         o->metadata_global_manual = 1;
2978.     if (type_in == 's' || type_out == 's')
                                ^
2979.         o->metadata_streams_manual = 1;
2980.     if (type_in == 'c' || type_out == 'c')

avconv.c:2980:9: Taking false branch
2978.     if (type_in == 's' || type_out == 's')
2979.         o->metadata_streams_manual = 1;
2980.     if (type_in == 'c' || type_out == 'c')
              ^
2981.         o->metadata_chapters_manual = 1;
2982. 

avconv.c:2980:27: Taking false branch
2978.     if (type_in == 's' || type_out == 's')
2979.         o->metadata_streams_manual = 1;
2980.     if (type_in == 'c' || type_out == 'c')
                                ^
2981.         o->metadata_chapters_manual = 1;
2982. 

avconv.c:3005:5: Switch condition is false. Skipping switch case
3003.         }\
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
3007. 

avconv.c:3005:5: Switch condition is false. Skipping switch case
3003.         }\
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
3007. 

avconv.c:3005:5: Switch condition is false. Skipping switch case
3003.         }\
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
3007. 

avconv.c:3006:5: Switch condition is false. Skipping switch case
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3007. 
3008.     /* for input streams choose first matching stream */

avconv.c:3006:5: Switch condition is false. Skipping switch case
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3007. 
3008.     /* for input streams choose first matching stream */

avconv.c:3006:5: Switch condition is false. Skipping switch case
3004. 
3005.     SET_DICT(type_in, meta_in, ic, idx_in);
3006.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3007. 
3008.     /* for input streams choose first matching stream */

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

avconv.c:3023:9: Taking false branch
3021.     }
3022. 
3023.     if (type_out == 's') {
              ^
3024.         for (i = 0; i < oc->nb_streams; i++) {
3025.             if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) {

avconv.c:3032:9: 
3030.         }
3031.     } else
3032.         av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE);
              ^
3033. 
3034.     return 0;
