Opened 13 years ago

Closed 13 years ago

#57 closed enhancement (fixed)

Patch to read disc number in mov.c

Reported by: Reuben Thomas Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I attach a patch against current git head to read disc number in mov.c, for example from .m4a files. I used the information at:

http://atomicparsley.sourceforge.net/mpeg-4files.html

to get the correct atom code and decode the information ('disk' works like 'trkn', so I was able to common up the decoding logic). Note that the tag I fill in is called 'disc', not 'disk', for consistency with the rest of ffmpeg.

The motivation to add this was that multi-disc albums were not sorting correctly in MPD build against libavformat. With this fix it works fine.

I'm very keen to see this fix get into ffmpeg, and this is the first patch I've sent, so if there's anything wrong with it, do say and I'll work to fix it.

Attachments (1)

0001-Add-reading-of-disc-number-to-mov.c.patch (2.4 KB ) - added by Reuben Thomas 13 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Baptiste Coudurier, 13 years ago

Thanks for the patch !

Change the parse function to take atom tag, and change the code only in parse_trkn

comment:2 by Reuben Thomas, 13 years ago

Sorry, can you explain a bit more, please? There is no function parse_trkn, and the atom tag is not enough, the key string is needed to pass to av_metadata_set2.

comment:3 by Reuben Thomas, 13 years ago

OK, I tried to understand the comment above and redid my patch.

comment:4 by Reuben Thomas, 13 years ago

Hi, please can you review the updated patch? I would like to get this one signed off!

comment:5 by Reuben Thomas, 13 years ago

(I checked, the patch still applies to git head.)

comment:6 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: newclosed
Version: gitgit-master

Pushed.

Thank you for your patience!

Note: See TracTickets for help on using tickets.