From: jbrjake Date: Wed, 4 Apr 2007 19:25:45 +0000 (+0000) Subject: Ooops. Restores xvid-in-mp4 functionality, which I broke with b-frame muxing. (Thanks... X-Git-Tag: 0.8.5-beta.1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8816f075ebda1282103e2998efa0bcf1a63662b;p=handbrake 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 --- 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;