Ticket #57 (closed enhancement: fixed)
Patch to read disc number in mov.c
| Reported by: | rrt | 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
Change History
comment:2 Changed 2 years ago by rrt
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 Changed 2 years ago by rrt
OK, I tried to understand the comment above and redid my patch.




Thanks for the patch !
Change the parse function to take atom tag, and change the code only in parse_trkn