[FFmpeg-devel] [PATCH 2/2] libavformat/mov: fix udta reading in trak box
Wang Chuan
ouchuanm at outlook.com
Tue Feb 8 09:48:22 EET 2022
Any news?
On 2022/2/4 19:10, Jan Ekström wrote:
> On Fri, Feb 4, 2022 at 5:24 AM Wang Chuan <ouchuanm at outlook.com> wrote:
>> Ping?
>> On Jan 28, 2022, 11:24 AM +0800, Wang Chuan <ouchuanm at outlook.com>, wrote:
>>> if we are reading udta in trak box, the data should go to metadata
>>> of current stream.
>>>
>>> Signed-off-by: Wang Chuan <ouchuanm at 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
> I recall having some patches on my github regarding something related,
> will attempt to check this during the week-end.
>
> Jan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list