summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-04-16 16:58:57 +0000
committerjbrjake <[email protected]>2007-04-16 16:58:57 +0000
commit1b38e1511ba75646540f6d2b90b21713614de392 (patch)
treed82a8a528f2c1d6201167d26e5615b5a23b0d145 /libhb/sync.c
parenta715de4c2ff593e121fbfa394409eff4e493415b (diff)
Much better B-frame muxing frame-reordering. This will preserve the sps/pps info, properly offset the first frame, and flush any remaining frames at the end of the encode.
Patch by: Nyx git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@513 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r--libhb/sync.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index 79423b70c..fb5d704ac 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -259,6 +259,14 @@ static int SyncVideo( hb_work_object_t * w )
hb_log( "sync: got %lld frames, %lld expected",
pv->count_frames, pv->count_frames_max );
pv->done = 1;
+
+ hb_buffer_t * buf_tmp;
+
+ // Drop an empty buffer into our output to ensure that things
+ // get flushed all the way out.
+ buf_tmp = hb_buffer_init(0); // Empty end buffer
+ hb_fifo_push( job->fifo_sync, buf_tmp );
+
return HB_WORK_DONE;
}
@@ -399,6 +407,12 @@ static int SyncVideo( hb_work_object_t * w )
{
hb_log( "sync: got %lld frames", pv->count_frames );
pv->done = 1;
+
+ // Drop an empty buffer into our output to ensure that things
+ // get flushed all the way out.
+ buf_tmp = hb_buffer_init(0); // Empty end buffer
+ hb_fifo_push( job->fifo_sync, buf_tmp );
+
break;
}
}