summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-05-02 23:24:55 +0000
committerjstebbins <[email protected]>2009-05-02 23:24:55 +0000
commit1b8d2b8a650247865ffd461ece479f8b404f1bee (patch)
tree4403498b796344959ce03ff4c41b5d94f7330b83 /gtk
parent2272709a6a704674f1beb441b703f673c543691c (diff)
LinGui: adjust vfr code to accomidate new method of handling vfr in libhb
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2369 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/hb-backend.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 05d0e5427..10a563074 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3480,12 +3480,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
/* Add selected filters */
job->filters = hb_list_init();
- gint vrate = ghb_settings_combo_int(js, "VideoFramerate");
- if( vrate == 0 && ghb_settings_combo_int(js, "PictureDetelecine" ) )
- job->vfr = 1;
- else
- job->vfr = 0;
-
gint detel = ghb_settings_combo_int(js, "PictureDetelecine");
if ( detel )
{
@@ -3569,13 +3563,8 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
job->vquality = -1.0;
job->vbitrate = ghb_settings_get_int(js, "VideoAvgBitrate");
}
- // AVI container does not support variable frame rate.
- if (job->mux == HB_MUX_AVI)
- {
- job->vfr = FALSE;
- job->cfr = 1;
- }
+ gint vrate = ghb_settings_combo_int(js, "VideoFramerate");
if( vrate == 0 )
{
job->vrate = title->rate;
@@ -3588,6 +3577,17 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
job->vrate_base = vrate;
job->cfr = 1;
}
+
+ // AVI container does not support variable frame rate.
+ // OGM supports variable frame rate, but bases all timing on
+ // DTS, which breaks when b-frames are used since it is
+ // impossible to reconstruct PTS from DTS when the framerate
+ // is variable.
+ if (job->mux == HB_MUX_AVI || job->mux == HB_MUX_OGM)
+ {
+ job->cfr = 1;
+ }
+
// First remove any audios that are already in the list
// This happens if you are encoding the same title a second time.
gint num_audio_tracks = hb_list_count(job->list_audio);