[FFmpeg-devel] [PATCHv3 0/7] vorbis: update metadata mid-stream

Ben Boeckel mathstuf at gmail.com
Mon Oct 28 03:47:28 CET 2013


Ogg/vorbis streams from MPD contain metadata updates mid-stream and need to be
plumbed from ffmpeg. The first problem is that the metadata packets are marked
as invalid in the avcodec end of things. To fix this, a function which fills in
a flags parameter with the kind of packet found is added. Second, a new
side_data type is added for the data. The ogg decoder in avformat needs a way
for codecs to plumb up the metadata and then, finally, vorbis fills it in.

Patch 5 has ffmpeg combine multiple tags with the same name with semicolon
separators. This is to prevent tags such as performer from only showing up as
the last one in the file.

Testing with flac, mp3 (via lame; twolame untested), and ogg/opus in MPD (and
one mp3 stream from somafm) shows no mid-stream tag updates, only ICY Info, so
I have not updated these decoders. If other formats are found, the
av_packet_pack_dictionary function should make things easy.

Ben Boeckel (7):
  avcodec: add side_data type for updated metadata
  avpacket: add pack/unpack functions for AVDictionary
  vorbis: handle special packets in the middle of a stream
  ogg: allow streams to update metadata
  vorbis: append data from tags together
  vorbis: extract metadata from the middle of a stream
  avcodec/utils: use the unpack_dictionary function

 libavcodec/avcodec.h         | 25 ++++++++++++++
 libavcodec/avpacket.c        | 55 +++++++++++++++++++++++++++++++
 libavcodec/utils.c           | 18 +++-------
 libavcodec/vorbis_parser.c   | 26 +++++++++++++--
 libavcodec/vorbis_parser.h   | 18 ++++++++++
 libavformat/oggdec.c         | 26 ++++++++++++---
 libavformat/oggdec.h         |  2 ++
 libavformat/oggparsevorbis.c | 78 +++++++++++++++++++++++++++++++++++---------
 8 files changed, 211 insertions(+), 37 deletions(-)

-- 
1.8.3.1



More information about the ffmpeg-devel mailing list