summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-04-04 19:25:45 +0000
committerjbrjake <[email protected]>2007-04-04 19:25:45 +0000
commitd8816f075ebda1282103e2998efa0bcf1a63662b (patch)
tree1444e6a3d56b2aafa7f56accd6cfc998a0f213e0 /libhb/muxmp4.c
parent2d1ae8ed793752954420a9697428416ad94e45f4 (diff)
Ooops. Restores xvid-in-mp4 functionality, which I broke with b-frame muxing. (Thanks for the bug report, superdump, and thanks for pointing out where the problem was, saintdev.)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@476 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r--libhb/muxmp4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 1d599fbb5..a3c7135ac 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -247,7 +247,7 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
displays a white box instead of video until the second GOP.
Also, you've got to save the skipped duration to keep from
throwing off the offset values. */
- if((mux_data->track == 1) && (thisSample == 0) && (buf->key != 1))
+ if((mux_data->track == 1) && (thisSample == 0) && (buf->key != 1) && (job->vcodec == HB_VCODEC_X264))
{
initDelay +=duration;
return 0;
@@ -256,7 +256,7 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
initial delay added to the frame order offset for b-frames.
Because of b-pyramid, double this duration when there are
b-pyramids, as denoted by job->areBframes equalling 2. */
- if ((mux_data->track == 1) && (thisSample == 0) && (buf->key == 1))
+ if ((mux_data->track == 1) && (thisSample == 0) && (buf->key == 1) && (job->vcodec == HB_VCODEC_X264))
{
initDelay += duration * job->areBframes;
thisSample++;
@@ -269,7 +269,7 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
difference between the presentation time stamp x264 gives
and the decoding time stamp from the buffer data. */
MP4WriteSample( m->file, mux_data->track, buf->data, buf->size,
- duration, ((mux_data->track != 1) || (job->areBframes==0)) ? 0 : ( initDelay + ((buf->encodedPTS - buf->start) * job->arate / 90000)),
+ duration, ((mux_data->track != 1) || (job->areBframes==0) || (job->vcodec != HB_VCODEC_X264)) ? 0 : ( initDelay + ((buf->encodedPTS - buf->start) * job->arate / 90000)),
(buf->key == 1) );
return 0;