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

avconv.c:3003:1: start of procedure copy_metadata()
3001. }
3002. 
3003. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
      ^
3004. {
3005.     AVDictionary **meta_in = NULL;

avconv.c:3005:5: 
3003. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)
3004. {
3005.     AVDictionary **meta_in = NULL;
          ^
3006.     AVDictionary **meta_out;
3007.     int i, ret = 0;

avconv.c:3007:5: 
3005.     AVDictionary **meta_in = NULL;
3006.     AVDictionary **meta_out;
3007.     int i, ret = 0;
          ^
3008.     char type_in, type_out;
3009.     const char *istream_spec = NULL, *ostream_spec = NULL;

avconv.c:3009:5: 
3007.     int i, ret = 0;
3008.     char type_in, type_out;
3009.     const char *istream_spec = NULL, *ostream_spec = NULL;
          ^
3010.     int idx_in = 0, idx_out = 0;
3011. 

avconv.c:3010:5: 
3008.     char type_in, type_out;
3009.     const char *istream_spec = NULL, *ostream_spec = NULL;
3010.     int idx_in = 0, idx_out = 0;
          ^
3011. 
3012.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);

avconv.c:3012:5: 
3010.     int idx_in = 0, idx_out = 0;
3011. 
3012.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
          ^
3013.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3014. 

avconv.c:2976:1: start of procedure parse_meta_type()
  2974.  * @param stream_spec for type s, the stream specifier is written here
  2975.  */
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2977. {
  2978.     if (*arg) {

avconv.c:2978:9: Taking true branch
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2977. {
  2978.     if (*arg) {
                ^
  2979.         *type = *arg;
  2980.         switch (*arg) {

avconv.c:2979:9: 
  2977. {
  2978.     if (*arg) {
  2979.         *type = *arg;
                ^
  2980.         switch (*arg) {
  2981.         case 'g':

avconv.c:2980:9: 
  2978.     if (*arg) {
  2979.         *type = *arg;
  2980.         switch (*arg) {
                ^
  2981.         case 'g':
  2982.             break;

avconv.c:2981:9: Switch condition is false. Skipping switch case
  2979.         *type = *arg;
  2980.         switch (*arg) {
  2981.         case 'g':
                ^
  2982.             break;
  2983.         case 's':

avconv.c:2983:9: Switch condition is false. Skipping switch case
  2981.         case 'g':
  2982.             break;
  2983.         case 's':
                ^
  2984.             if (*(++arg) && *arg != ':') {
  2985.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2990:9: Switch condition is false. Skipping switch case
  2988.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2989.             break;
  2990.         case 'c':
                ^
  2991.         case 'p':
  2992.             if (*(++arg) == ':')

avconv.c:2991:9: Switch condition is false. Skipping switch case
  2989.             break;
  2990.         case 'c':
  2991.         case 'p':
                ^
  2992.             if (*(++arg) == ':')
  2993.                 *index = strtol(++arg, NULL, 0);

avconv.c:2996:13: Skipping av_log(): empty list of specs
  2994.             break;
  2995.         default:
  2996.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2997.             exit_program(1);
  2998.         }

avconv.c:2997:13: Skipping exit_program(): empty list of specs
  2995.         default:
  2996.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2997.             exit_program(1);
                    ^
  2998.         }
  2999.     } else

avconv.c:2978:5: 
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2977. {
  2978.     if (*arg) {
            ^
  2979.         *type = *arg;
  2980.         switch (*arg) {

avconv.c:3001:1: return from a call to parse_meta_type
  2999.     } else
  3000.         *type = 'g';
  3001. }
        ^
  3002. 
  3003. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:3013:5: 
3011. 
3012.     parse_meta_type(inspec,  &type_in,  &idx_in,  &istream_spec);
3013.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
          ^
3014. 
3015.     if (type_in == 'g' || type_out == 'g')

avconv.c:2976:1: start of procedure parse_meta_type()
  2974.  * @param stream_spec for type s, the stream specifier is written here
  2975.  */
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
        ^
  2977. {
  2978.     if (*arg) {

avconv.c:2978:9: Taking true branch
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2977. {
  2978.     if (*arg) {
                ^
  2979.         *type = *arg;
  2980.         switch (*arg) {

avconv.c:2979:9: 
  2977. {
  2978.     if (*arg) {
  2979.         *type = *arg;
                ^
  2980.         switch (*arg) {
  2981.         case 'g':

avconv.c:2980:9: 
  2978.     if (*arg) {
  2979.         *type = *arg;
  2980.         switch (*arg) {
                ^
  2981.         case 'g':
  2982.             break;

avconv.c:2981:9: Switch condition is false. Skipping switch case
  2979.         *type = *arg;
  2980.         switch (*arg) {
  2981.         case 'g':
                ^
  2982.             break;
  2983.         case 's':

avconv.c:2983:9: Switch condition is false. Skipping switch case
  2981.         case 'g':
  2982.             break;
  2983.         case 's':
                ^
  2984.             if (*(++arg) && *arg != ':') {
  2985.                 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);

avconv.c:2990:9: Switch condition is false. Skipping switch case
  2988.             *stream_spec = *arg == ':' ? arg + 1 : "";
  2989.             break;
  2990.         case 'c':
                ^
  2991.         case 'p':
  2992.             if (*(++arg) == ':')

avconv.c:2991:9: Switch condition is false. Skipping switch case
  2989.             break;
  2990.         case 'c':
  2991.         case 'p':
                ^
  2992.             if (*(++arg) == ':')
  2993.                 *index = strtol(++arg, NULL, 0);

avconv.c:2996:13: Skipping av_log(): empty list of specs
  2994.             break;
  2995.         default:
  2996.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
                    ^
  2997.             exit_program(1);
  2998.         }

avconv.c:2997:13: Skipping exit_program(): empty list of specs
  2995.         default:
  2996.             av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
  2997.             exit_program(1);
                    ^
  2998.         }
  2999.     } else

avconv.c:2978:5: 
  2976. static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
  2977. {
  2978.     if (*arg) {
            ^
  2979.         *type = *arg;
  2980.         switch (*arg) {

avconv.c:3001:1: return from a call to parse_meta_type
  2999.     } else
  3000.         *type = 'g';
  3001. }
        ^
  3002. 
  3003. static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o)

avconv.c:3015:9: Taking false branch
3013.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3014. 
3015.     if (type_in == 'g' || type_out == 'g')
              ^
3016.         o->metadata_global_manual = 1;
3017.     if (type_in == 's' || type_out == 's')

avconv.c:3015:27: Taking false branch
3013.     parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec);
3014. 
3015.     if (type_in == 'g' || type_out == 'g')
                                ^
3016.         o->metadata_global_manual = 1;
3017.     if (type_in == 's' || type_out == 's')

avconv.c:3017:9: Taking false branch
3015.     if (type_in == 'g' || type_out == 'g')
3016.         o->metadata_global_manual = 1;
3017.     if (type_in == 's' || type_out == 's')
              ^
3018.         o->metadata_streams_manual = 1;
3019.     if (type_in == 'c' || type_out == 'c')

avconv.c:3017:27: Taking false branch
3015.     if (type_in == 'g' || type_out == 'g')
3016.         o->metadata_global_manual = 1;
3017.     if (type_in == 's' || type_out == 's')
                                ^
3018.         o->metadata_streams_manual = 1;
3019.     if (type_in == 'c' || type_out == 'c')

avconv.c:3019:9: Taking false branch
3017.     if (type_in == 's' || type_out == 's')
3018.         o->metadata_streams_manual = 1;
3019.     if (type_in == 'c' || type_out == 'c')
              ^
3020.         o->metadata_chapters_manual = 1;
3021. 

avconv.c:3019:27: Taking false branch
3017.     if (type_in == 's' || type_out == 's')
3018.         o->metadata_streams_manual = 1;
3019.     if (type_in == 'c' || type_out == 'c')
                                ^
3020.         o->metadata_chapters_manual = 1;
3021. 

avconv.c:3044:5: Switch condition is false. Skipping switch case
3042.         }\
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
3046. 

avconv.c:3044:5: Switch condition is false. Skipping switch case
3042.         }\
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
3046. 

avconv.c:3044:5: Switch condition is false. Skipping switch case
3042.         }\
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
          ^
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
3046. 

avconv.c:3045:5: Switch condition is false. Skipping switch case
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3046. 
3047.     /* for input streams choose first matching stream */

avconv.c:3045:5: Switch condition is false. Skipping switch case
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3046. 
3047.     /* for input streams choose first matching stream */

avconv.c:3045:5: Switch condition is false. Skipping switch case
3043. 
3044.     SET_DICT(type_in, meta_in, ic, idx_in);
3045.     SET_DICT(type_out, meta_out, oc, idx_out);
          ^
3046. 
3047.     /* for input streams choose first matching stream */

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

avconv.c:3062:9: Taking false branch
3060.     }
3061. 
3062.     if (type_out == 's') {
              ^
3063.         for (i = 0; i < oc->nb_streams; i++) {
3064.             if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) {

avconv.c:3071:9: 
3069.         }
3070.     } else
3071.         av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE);
              ^
3072. 
3073.     return 0;
