summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
diff options
context:
space:
mode:
authorsaintdev <[email protected]>2007-06-17 00:51:17 +0000
committersaintdev <[email protected]>2007-06-17 00:51:17 +0000
commitb7552e4d2409d1f2615caf418d4d0ac8d8bff981 (patch)
tree4b2b833a8e06dc16cf38c01182254d43612d8617 /libhb/muxmp4.c
parent51a0dfdd04c910de55aa09db8a7039ea25999735 (diff)
Switch buf->key to buf->frametype which is a bitmask telling us what type of frame we are dealing with.
This doesn't change any functionality, but I need to be able to distinguish between x264 IDR and I frames for the upcoming matroska muxer. This also has the side effect of making the code a little easier to read and maintain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@623 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r--libhb/muxmp4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index c70e2c114..c029487b0 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -384,7 +384,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) && (job->vcodec == HB_VCODEC_X264))
+ if ((mux_data->track == 1) && (thisSample == 0) && (buf->frametype & HB_FRAME_KEY) && (job->vcodec == HB_VCODEC_X264))
{
initDelay = buf->renderOffset;
thisSample++;
@@ -398,7 +398,7 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
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) || (job->vcodec != HB_VCODEC_X264)) ? 0 : ( buf->renderOffset * job->arate / 90000),
- (buf->key == 1) );
+ ((buf->frametype & HB_FRAME_KEY) != 0) );
return 0;
}