From db68ef898a3802e51b6f41fd600d0d46d058e3f8 Mon Sep 17 00:00:00 2001 From: Andrew Stone Date: Tue, 12 Aug 2014 17:03:55 -0400 Subject: ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes. Originally, AVFormatContext and a metadata dict were provided to ff_vorbis_comment(), but this presented issues if an AVStream was being updated or the metadata on AVFormatContext wasn't actually being updated. To remedy this, ff_vorbis_stream_comment() explicitly updates a stream's metadata and sets any necessary flags. ff_vorbis_comment() does not modify any flags, and any calls to it that update AVFormatContext's metadata (just a single call) must also update AVFormatContext.event_flags after detecting any metadata changes to the provided dictionary, as signaled by a positive return value. Signed-off-by: Anton Khirnov --- libavformat/oggparsetheora.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/oggparsetheora.c') diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index 8a5e1d8351..d78f02d67a 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -116,7 +116,7 @@ static int theora_header(AVFormatContext *s, int idx) } break; case 0x81: - ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, os->psize - 7, 1); + ff_vorbis_stream_comment(s, st, os->buf + os->pstart + 7, os->psize - 7); case 0x82: if (!thp->version) return AVERROR_INVALIDDATA; -- cgit v1.2.3