[FFmpeg-devel] [PATCH 2/3] lavf/movenc: fix writing of some iTunes metadata tag

Matthieu Bouron matthieu.bouron at gmail.com
Tue Jul 2 21:21:51 CEST 2013


On Tue, Jul 2, 2013 at 7:01 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> On Sun, Jun 30, 2013 at 04:15:45PM +0200, Matthieu Bouron wrote:
> > Fix metadata display under iTunes for files using pgap, hdvd, stick,
> > tvsn and tves tags.
> > ---
> >  libavformat/movenc.c | 13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > index 8cf7fdc..5577530 100644
> > --- a/libavformat/movenc.c
> > +++ b/libavformat/movenc.c
> > @@ -2046,16 +2046,25 @@ static int
> mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
> >  {
> >      AVDictionaryEntry *t = NULL;
> >      uint8_t num;
> > +    int size = 25 + 3 * (len == 4);
>
> 24 + len
>

Size include the real data size (1byte or 3 padding byte + 1 byte), the
resulting size is either 25 or 28.
[ 4b size ] [ 4b "name" ] [ 4b data size ] [ 4b "data" ] [ 4b data type ] [
4b flags ] [ (1b or 4b) data value ]


>
> or you could maybe use update_size()
>

Size is re-used for the data atom and is equal to size - 8.

Matthieu


More information about the ffmpeg-devel mailing list