mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-04-24 08:36:01 +08:00
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 <anton@khirnov.net>
This commit is contained in:
committed by
Anton Khirnov
parent
cc3e88a2b9
commit
db68ef898a
@@ -97,7 +97,7 @@ ogm_header(AVFormatContext *s, int idx)
|
||||
} else if (bytestream2_peek_byte(&p) == 3) {
|
||||
bytestream2_skip(&p, 7);
|
||||
if (bytestream2_get_bytes_left(&p) > 1)
|
||||
ff_vorbis_comment(s, &st->metadata, p.buffer, bytestream2_get_bytes_left(&p) - 1, 1);
|
||||
ff_vorbis_stream_comment(s, st, p.buffer, bytestream2_get_bytes_left(&p) - 1);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user