[FFmpeg-devel] AVDictionary for binary tags

Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jan 20 16:40:18 CET 2012

Hi Everybody!

I would like to propose an advancement for AVDictionary which allows working with binary tags. Binary data can be cover art image built into tags of audio files, as one of possible examples.

The ABI shall be compatible with older versions.

The idea is to add additional function which sets binary data:
int av_dict_set_binary(AVDictionary **pm, const char *key, const void *value, int64_t bsize, int flags);

AVDictionaryEntry gets additional member 'int64_t bsize' which, if non 0, is the size of binary data pointed by 'value' member represented in bytes. If 0, then value points to string (defualt behavior).

I also modified mov.c in libavformat where used av_dict_set_binary to set image data from cover art tag 'covr'. The test was done on M4A files with embedded jpeg image.

I am attaching patch which provides these changes and hope it may be useful for the project.

Best regards,
Dmitry Kostjuchenko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 6816 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120120/efd4d609/attachment.obj>

More information about the ffmpeg-devel mailing list