From 4d08f30d253511bd82db88a9666db6f6cc0de861 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 28 Feb 2010 07:45:23 +0000 Subject: Use the KEYFRAME define instead of some magic number. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30789 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ve_x264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpcodecs/ve_x264.c') diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 43cac95237..8674cd8d9e 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -263,7 +263,7 @@ static int encode_frame(struct vf_instance *vf, x264_picture_t *pic_in) && param.i_frame_reference == 1 && !param.i_bframe); memcpy(mod->mux->buffer, nal->p_payload, i_size); - muxer_write_chunk(mod->mux, i_size, keyframe?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE); + muxer_write_chunk(mod->mux, i_size, keyframe?AVIIF_KEYFRAME:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE); } else ++mod->mux->encoder_delay; -- cgit v1.2.3 From e86ecdac038fe0aef5ef2dc58296307e1f00184b Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 28 Feb 2010 07:52:34 +0000 Subject: Reuse the keyframe flag from x264 instead of trying to derive it on our own. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30790 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ve_x264.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libmpcodecs/ve_x264.c') diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 8674cd8d9e..3f149f6de6 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -258,10 +258,7 @@ static int encode_frame(struct vf_instance *vf, x264_picture_t *pic_in) return -1; } if(i_size>0) { - int keyframe = (pic_out.i_type == X264_TYPE_IDR) || - (pic_out.i_type == X264_TYPE_I - && param.i_frame_reference == 1 - && !param.i_bframe); + int keyframe = pic_out.b_keyframe; memcpy(mod->mux->buffer, nal->p_payload, i_size); muxer_write_chunk(mod->mux, i_size, keyframe?AVIIF_KEYFRAME:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE); } -- cgit v1.2.3