Opened 10 years ago

Closed 10 years ago

#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


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:

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 rrt 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by bcoudurier

Thanks for the patch !

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

comment:2 Changed 10 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 10 years ago by rrt

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

comment:4 Changed 10 years ago by rrt

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

comment:5 Changed 10 years ago by rrt

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

comment:6 Changed 10 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from git to git-master


Thank you for your patience!

Note: See TracTickets for help on using tickets.