While mov_write_tmpo_tag() had code to write a 16-bit integer atom, mov_write_int8_metadata() had code to write 8-bit and 32-bit integer atoms with an 8-bit value. Both functions were extremely similar though.
Consolidated the two in three steps, preserving mov_write_int8_metadata()'s constraints (that it only writes a uint8_t value). The patches could obviously be squashed. OPEN: The herewith introduced compatability macro mov_write_int8_metadata() could be dropped in favor of using the replacement function directly. OPEN: No sure whether the metadata key "tmpo" is the (only) proper one for use of this atom. https://github.com/hile/soundforest/blob/master/soundforest/tags/formats/aac.py indicates it might be "bpm", as does http://edd.wp-a2z.org/oik_api/getid3_quicktimecopytoappropriatecommentssection/ That would be a subsequent patch adding mov_write_int_metadata (s, pb, "tmpo", "bpm" , 2, 2); as an additional translation (at the risk of duplicating the atom). Otherwise: where in the libs or the application are metadata keys translated? Moritz Barsnick (3): avformat/movenc: allow padding to two bytes in mov_write_int8_metadata() avformat/movenc: add mov_write_int_metadata() avformat/movenc: use mov_write_int_metadata() in place of mov_write_tmpo_tag() libavformat/movenc.c | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) -- 2.14.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel