Closed joshstaiger closed 5 years ago
@joshstaiger Thanks for the the quick patch! That's not the way I would format the code but I can't argue with the speed. :)
Does that work for you, @samhutchins? And should we replicate something like this elsewhere?
BTW, I can't test any of this until I get back to my development machine this evening.
@joshstaiger And a quick update for the end-of-stream issue! You're on a roll, sir. :)
A little too quick ;)
Anyway, I'll let you guys take over. I've tested on a couple different encodings that I've had trouble with in the past and it seems to work okay.
Feel free to reformat the code however you'd like.
Buffering seems to work based on my quick tests, I don't have any sources that expose the bug handy though
No console spew with this PR, which is nice :-)
@joshstaiger @samhutchins It looks like I won't be able to test this until late tomorrow afternoon or evening due to family commitments. My apologies.
But if this fixes both problems and doesn't cause side effects with progress feedback or log file consistency then I want to take the change.
@joshstaiger @samhutchins I managed to squeeze in a quick test in the midst of family commitments and... it seemed to work fine! No side effects.
But I won't be able to test it thoroughly until much later today. And if it passes those tests I'll merge it, reformat it and then look at applying the same change to other places in the code.
Thanks!
@joshstaiger I squashed and merged your patch but for some strange reason your revision to flush the buffer wasn't included. Go figure. However, I restored it when I revised your nomenclature and formatting. Please review those changes to make sure it's all there.
Also, please review the changes to see how I reformatted your code. Why? Because I want you to understand the code style because I hope to get more excellent patches like this from you in the future, sir! And I'm a style nazi. Talk to @samhutchins, he has lots of experience with my quirks. :)
Thanks, again! This will get released sometime next week.
@joshstaiger OK, I'm an idiot. :) I made a cut and paste error when revising your code. Your revision to flush the buffer was there. And everything should be fixed now. Sorry for the confusion.
No worries. I've done worse :)
After the fix, the logic looks correct and the formatting looks entirely reasonable.
Will plan to retest after release.
@joshstaiger OK, this has now been released in version 0.25.0 of the Gem. Thanks again for all your help!
@joshstaiger @donmelton Did a quick test run:
+ audio tracks:
+ 1, English (FLAC) (2.0 ch) (iso639-2: eng)
+ 2, 日本語 (FLAC) (2.0 ch) (iso639-2: jpn)
+ subtitle tracks:
+ 1, English [PGS]
+ 2, English [PGS]
+ 3, English [PGS]
+ 4, English [PGS]
+ 5, 日本語 [PGS]
Look at that glory! Thank you @joshstaiger for this fix and making WSL less predictably unpredictable.
@klogg416 And thanks for testing, sir!
Buffer multibyte UTF-8 characters to prevent crash detailed in
https://github.com/donmelton/video_transcoding/pull/263