Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 2/2] libavformat/mov: fix udta reading in trak box
@ 2022-01-28  3:24 Wang Chuan
  0 siblings, 0 replies; 6+ messages in thread
From: Wang Chuan @ 2022-01-28  3:24 UTC (permalink / raw)
  To: ffmpeg-devel

if we are reading udta in trak box, the data should go to metadata
of current stream.

Signed-off-by: Wang Chuan <ouchuanm@outlook.com>
---
  libavformat/mov.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1437d160f8..cb983defb3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -522,7 +522,10 @@ retry:
              str[str_size] = 0;
          }
          c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;
-        av_dict_set(&c->fc->metadata, key, str, 0);
+        if (c->trak_index != -1)
+            av_dict_set(&c->fc->streams[c->trak_index]->metadata, key, 
str, 0);
+        else
+            av_dict_set(&c->fc->metadata, key, str, 0);
          if (*language && strcmp(language, "und")) {
              snprintf(key2, sizeof(key2), "%s-%s", key, language);
              av_dict_set(&c->fc->metadata, key2, str, 0);
-- 
2.29.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-11 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <a28c40ef-1f32-2f70-2574-3533bdff7f78@outlook.com>
2022-02-04  3:23 ` [FFmpeg-devel] [PATCH 2/2] libavformat/mov: fix udta reading in trak box Wang Chuan
2022-02-04 11:10   ` Jan Ekström
2022-02-08  7:48     ` Wang Chuan
2022-02-08 23:31       ` Jan Ekström
2022-02-11 18:00         ` Wang Chuan
2022-01-28  3:24 Wang Chuan

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git