[FFmpeg-user] Binary tag in udta metadata with early NULL char
Louis Letourneau
lletourn49 at gmail.com
Mon Feb 3 22:05:40 EET 2025
I have a gopro video. Some data is stored in the udta of the MP4.
I want to extract that and parse it.
AVFormatContext gives the metadata and I can iterate on tags no problem.
In libavformat/mov.c I see it's parsed in it's entirety.
```
int ret = ffio_read_size(pb, str, str_size);
if (ret < 0) {
av_free(str);
return ret;
}
str[str_size] = 0;
[...]
av_dict_set(&c->fc->metadata, key, str, 0);
```
And a terminating NULL is added too.
But since the data is binary, the 4th character is NULL. and
AVDictionaryEntry doesn't return the value size.
How can I get the whole payload if I don't know the size?
Is there another api for binary values?
thank you
More information about the ffmpeg-user
mailing list