looks fairly easy to do, from what I remember of my investigation of the code. all the ffmpeg stuff is in that file.
just search and highlight a few of the variables relating to picture_pts
there are multiple issues in there, separate but related. it’s not going to be a single-line fix.