Some files keep extra metadata such as 'name' fields within udta, and it is useful for Wine to access them with the "export_all" option so they can then be exposed to Windows applications.
Unified · Split
| @@ -354,6 +354,12 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 353 unmodified lines | ||
| 354 | 354 | int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL; |
| 355 | 355 | int raw = 0; |
| 356 | 356 | int num = 0; |
| 357 | + AVDictionary **metadata; | |
| 358 | + | |
| 359 | + if (c->trak_index >= 0 && c->trak_index < c->fc->nb_streams) | |
| 360 | + metadata = &c->fc->streams[c->trak_index]->metadata; | |
| 361 | + else | |
| 362 | + metadata = &c->fc->metadata; | |
| 357 | 363 | |
| 358 | 364 | switch (atom.type) { |
| 359 | 365 | case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break; |
| @@ -572,10 +578,10 @@ retry: · 212 unmodified lines | ||
| 572 | 578 | str[str_size] = 0; |
| 573 | 579 | } |
| 574 | 580 | c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; |
| 575 | − av_dict_set(&c->fc->metadata, key, str, 0); | |
| 581 | + av_dict_set(metadata, key, str, 0); | |
| 576 | 582 | if (*language && strcmp(language, "und")) { |
| 577 | 583 | snprintf(key2, sizeof(key2), "%s-%s", key, language); |
| 578 | − av_dict_set(&c->fc->metadata, key2, str, 0); | |
| 584 | + av_dict_set(metadata, key2, str, 0); | |
| 579 | 585 | } |
| 580 | 586 | if (!strcmp(key, "encoder")) { |
| 581 | 587 | int major, minor, micro; |