CLI: fix broken code for preserving libhb's default muxer.

It was checking if (job->mux) instead of if (mux)…

Also move setting the muxer and muxer options earlier, as we need to know the final muxer when e.g. setting audio settings.

Also, don't set the default audio codec before we have all relevant information.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5445 b64f7644-9d1e-0410-96f1-a4d463321fa5
decsrtsub: rework character substitution logic.

Don't pointlessly convert a line break to a space if it's the last character.

Also, only skip a CR character if it's followed by an LF character. Otherwise, replace it with an LF character or a space, depending on the line number.
 


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5446 b64f7644-9d1e-0410-96f1-a4d463321fa5
Improve upon previous commit.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5447 b64f7644-9d1e-0410-96f1-a4d463321fa5
LinGui: Fix a bug in audio panel
When changing the output track selection, the available bitrates and
mixdowns did not update properly.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5448 b64f7644-9d1e-0410-96f1-a4d463321fa5
LinGui: fix a problem with batch enqueue

The current chapter start/end was applied to all titles.  So if the
currently selected title has fewer chapters than other titles, chapters
would be missing in the encoded titles.


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5449 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Fix a number of cosmetic issues and a bug with the Check for updates dropdown on a clean system.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5450 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGui: refactor handling on chapter titles.

job->list_chapters is reset by any call to hb_job_reset(), so store chapter titles in an NSArray instead.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5451 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGui: fix a bug where the iPod 5G checkbox would be disabled for x264 in MP4.

This would happen when switching from MKV with a Theora encoder to MP4: the encoder would be reset to x264, but we failed to detect the change of encoder and therefore didn't call videoEncoderPopUpChanged.

Also, don't needlessly call twoPassCheckboxChanged after videoEncoderPopUpChanged since the latter calls the former.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5452 b64f7644-9d1e-0410-96f1-a4d463321fa5
MacGui: stop before the last ("None") subtitle track when converting incompatible tracks to burn-in.

We were calling [[tempObject objectForKey:@"subtitleSourceTrackType"] intValue], so for "None", [nil intValue], which was returning 0. As it turns out, VOBSUB == 0 thus hb_subtitle_can_pass() was true out of sheer luck.

In a case where e.g. hb_subtitle_can_pass(VOBSUB, mux) is false (such as with the upcoming HB_MUX_AV_MP4 muxer), the None track would actually be deleted!



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5453 b64f7644-9d1e-0410-96f1-a4d463321fa5
Bump Libav to v9.6.

Miscellaneous security and bug fixes, including support for mixed interlaced/non-interlaced ProRes video.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5454 b64f7644-9d1e-0410-96f1-a4d463321fa5
decsrtsub: clear remnants of the previous line before progessing a new one.

I don't really understand why, but this prevents miscellaneous subtitle corruption.



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5456 b64f7644-9d1e-0410-96f1-a4d463321fa5
sync: fall back to drop_video_to_sync when hb_avcodec_open() fails, instesd of killing the job.

Patch by John Stebbins. Thanks!



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5459 b64f7644-9d1e-0410-96f1-a4d463321fa5
x264: hardcode the version string so that the full and correct x264 version is used in encoder/set.c, regardless of the tarball (full git repo vs. git archive) or where HandBrake is built from (source tarball vs. svn or git checkout).



git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5461 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Fix typo

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5467 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Fix build script

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5470 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Rectored some Encode/Queue service code. This restoes "Quit HandBrake" when done option.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5485 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Some additional work on my prototype batch add to queue feature.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5486 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Change the CLI Helper to use the application startup path rather than the search path when looking for the CLI exe. Apparently OpenWith on windows causes the search path to be different.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5487 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Adding missing x264UseAdvancedOptions Key.  Allow the Queue window to be resized.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5497 b64f7644-9d1e-0410-96f1-a4d463321fa5
WinGui: Make the AutoNaming feature less trigger happy. It should not run for cases where it's not going to change the underlying filename.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5498 b64f7644-9d1e-0410-96f1-a4d463321fa5