diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 23:51:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 23:51:03 +0200 |
commit | a90364d001eb8289e1c423bf9884bb0affc3f662 (patch) | |
tree | 6ea390e2b332387ad8686bf6719d73e283ae3364 | |
parent | 1110a030c73291e7df30e8e755cb14351ac924e8 (diff) | |
parent | cc3e88a2b9e7ecf62e4ea1c41ce1623cea67ee96 (diff) | |
download | ffmpeg-a90364d001eb8289e1c423bf9884bb0affc3f662.tar.gz |
Merge commit 'cc3e88a2b9e7ecf62e4ea1c41ce1623cea67ee96'
* commit 'cc3e88a2b9e7ecf62e4ea1c41ce1623cea67ee96':
mov: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Conflicts:
libavformat/mov.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index b2ef482ce2..767833ed05 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -83,6 +83,7 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, snprintf(buf, sizeof(buf), "%d", current); else snprintf(buf, sizeof(buf), "%d/%d", current, total); + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set(&c->fc->metadata, key, buf, 0); return 0; @@ -99,6 +100,7 @@ static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb, avio_r8(pb); snprintf(buf, sizeof(buf), "%d", avio_r8(pb)); + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set(&c->fc->metadata, key, buf, 0); return 0; @@ -110,6 +112,7 @@ static int mov_metadata_int8_no_padding(MOVContext *c, AVIOContext *pb, char buf[16]; snprintf(buf, sizeof(buf), "%d", avio_r8(pb)); + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set(&c->fc->metadata, key, buf, 0); return 0; @@ -125,6 +128,7 @@ static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb, genre = avio_r8(pb); if (genre < 1 || genre > ID3v1_GENRE_MAX) return 0; + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set(&c->fc->metadata, key, ff_id3v1_genre_str[genre-1], 0); return 0; @@ -254,6 +258,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len) snprintf(key2, sizeof(key2), "%s-%s", key, language); av_dict_set(&c->fc->metadata, key2, buf, 0); } + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; return av_dict_set(&c->fc->metadata, key, buf, 0); } @@ -372,6 +377,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ret < 0 ? ret : AVERROR_INVALIDDATA; str[str_size] = 0; } + c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set(&c->fc->metadata, key, str, 0); if (*language && strcmp(language, "und")) { snprintf(key2, sizeof(key2), "%s-%s", key, language); |