// found 'out' - remove it from the chain
pred->next = succ;
}
+ out->next = 0;
hb_buffer_close( &out );
return succ;
}
/* In order to make sure we have continuous time stamps, store
the current frame's duration as starting when the last one stopped. */
pv->last_start[0] = pv->last_stop[1];
- pv->last_stop[0] = pv->last_start[0] + (in->stop - in->start);
+ pv->last_stop[0] = pv->last_start[0] + (buf_tmp_in->stop - buf_tmp_in->start);
}
/* Apply subtitles */
pv->count_frames, pv->drops, pv->dups );
}
- hb_log("render: lost time: %lld (%i frames)", pv->total_lost_time, pv->dropped_frames);
- hb_log("render: gained time: %lld (%i frames) (%lld not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time);
+ hb_interjob_t * interjob = hb_interjob_get( w->private_data->job->h );
+
+ /* Preserve dropped frame count for more accurate framerates in 2nd passes. */
+ interjob->render_dropped = pv->dropped_frames;
+
+ hb_log("render: lost time: %"PRId64" (%i frames)", pv->total_lost_time, pv->dropped_frames);
+ hb_log("render: gained time: %"PRId64" (%i frames) (%"PRId64" not accounted for)", pv->total_gained_time, pv->extended_frames, pv->total_lost_time - pv->total_gained_time);
if (pv->dropped_frames)
- hb_log("render: average dropped frame duration: %lld", (pv->total_lost_time / pv->dropped_frames) );
+ hb_log("render: average dropped frame duration: %"PRId64, (pv->total_lost_time / pv->dropped_frames) );
/* Cleanup subtitle queue */
if( pv->subtitle_queue )
}
/* Setup FIFO queue for subtitle cache */
- pv->subtitle_queue = hb_fifo_init( 8 );
- pv->delay_queue = hb_fifo_init( 8 );
+ pv->subtitle_queue = hb_fifo_init( 8, 1 );
+ pv->delay_queue = hb_fifo_init( 8, 1 );
/* VFR IVTC needs a bunch of time-keeping variables to track
how many frames are dropped, how many are extended, what the