-
Notifications
You must be signed in to change notification settings - Fork 169
Write out CHAP frames in start_time order, ref #506 #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Alternatively, we can maintain the sorting logic inside the def sort_key(items):
frame, data = items
frame_key = frame.HashKey
frame_size = len(data)
# Let's ensure chapters are always sorted by their 'start_time'
# and not by size/element_id pair.
if frame.FrameID == "CHAP":
frame_key = frame.FrameID
frame_size = frame.start_time
return (get_prio(frame), frame_key, frame_size) |
Hi, is there anything I can change to get this PR moving? I'll be happy to incorporate the changes suggested (sort in |
@ping Thanks for getting back to this. Yes, I think implementing this sorting as part of |
@phw return (get_prio(frame), frame_key, frame_size) should be return (get_prio(frame), frame_size, frame_key) The PR has been updated with the changes. |
I’d certainly like to see this merged! It’s causing issues in all my players. |
This is my attempt at a fix for #506 to write out CHAP frames in start_time order (due to issues with ffmpeg converting mp3 to m4b).
Tried to keep the changes to a minimal but it may look a little hacky.