Revision d0abe80a ffmpeg.c

View differences:

ffmpeg.c
129 129
/* first item specifies output metadata, second is input */
130 130
static AVMetaDataMap (*meta_data_maps)[2] = NULL;
131 131
static int nb_meta_data_maps;
132
static int metadata_streams_autocopy  = 1;
133
static int metadata_chapters_autocopy = 1;
132 134

  
133 135
/* indexed by output file stream index */
134 136
static int *streamid_map = NULL;
......
1860 1862
        out_ch->start     = FFMAX(0,  in_ch->start - ts_off);
1861 1863
        out_ch->end       = FFMIN(rt, in_ch->end   - ts_off);
1862 1864

  
1865
        if (metadata_chapters_autocopy)
1863 1866
        while ((t = av_metadata_get(in_ch->metadata, "", t, AV_METADATA_IGNORE_SUFFIX)))
1864 1867
            av_metadata_set2(&out_ch->metadata, t->key, t->value, 0);
1865 1868

  
......
2089 2092
        codec = ost->st->codec;
2090 2093
        icodec = ist->st->codec;
2091 2094

  
2095
        if (metadata_streams_autocopy)
2092 2096
        while ((t = av_metadata_get(ist->st->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) {
2093 2097
            av_metadata_set2(&ost->st->metadata, t->key, t->value, AV_METADATA_DONT_OVERWRITE);
2094 2098
        }
......
2950 2954
    m1 = &meta_data_maps[nb_meta_data_maps - 1][1];
2951 2955
    m1->file = strtol(p, &p, 0);
2952 2956
    parse_meta_type(p, &m1->type, &m1->index, &p);
2957

  
2958
    if (m->type == 's' || m1->type == 's')
2959
        metadata_streams_autocopy = 0;
2960
    if (m->type == 'c' || m1->type == 'c')
2961
        metadata_chapters_autocopy = 0;
2953 2962
}
2954 2963

  
2955 2964
static void opt_input_ts_scale(const char *arg)

Also available in: Unified diff