diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 23:44:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-13 23:44:53 +0200 |
commit | 1110a030c73291e7df30e8e755cb14351ac924e8 (patch) | |
tree | 940fcb76349b9b7a2c62be857a60d82254a56c42 /libavformat | |
parent | 314c198413bf4cc07190ba3b828d693cc474db9d (diff) | |
parent | fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa (diff) | |
download | ffmpeg-1110a030c73291e7df30e8e755cb14351ac924e8.tar.gz |
Merge commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa'
* commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa':
nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nutdec.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index c4ab409ffa..057fdc7212 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -484,9 +484,11 @@ static int decode_info_header(NUTContext *nut) int64_t value, end; char name[256], str_value[1024], type_str[256]; const char *type; + int *event_flags; AVChapter *chapter = NULL; AVStream *st = NULL; AVDictionary **metadata = NULL; + int metadata_flag = 0; end = get_packetheader(nut, bc, 1, INFO_STARTCODE); end += avio_tell(bc); @@ -507,8 +509,13 @@ static int decode_info_header(NUTContext *nut) } else if (stream_id_plus1) { st = s->streams[stream_id_plus1 - 1]; metadata = &st->metadata; - } else + event_flags = &st->event_flags; + metadata_flag = AVSTREAM_EVENT_FLAG_METADATA_UPDATED; + } else { metadata = &s->metadata; + event_flags = &s->event_flags; + metadata_flag = AVFMT_EVENT_FLAG_METADATA_UPDATED; + } for (i = 0; i < count; i++) { get_str(bc, name, sizeof(name)); @@ -552,8 +559,10 @@ static int decode_info_header(NUTContext *nut) } if (metadata && av_strcasecmp(name, "Uses") && - av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) + av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) { + *event_flags |= metadata_flag; av_dict_set(metadata, name, str_value, 0); + } } } |