Upstream status: Mailed to Francesco on 26/10/2009 Index: transcode-1.1.4/encode/encode_x264.c =================================================================== --- transcode-1.1.4.orig/encode/encode_x264.c +++ transcode-1.1.4/encode/encode_x264.c @@ -166,7 +166,11 @@ static TCConfigEntry conf[] ={ /* How often B-frames are used */ OPT_RANGE(i_bframe_bias, "b_bias", -90, 100) /* Keep some B-frames as references */ +#if X264_BUILD >= 78 + OPT_RANGE(i_bframe_pyramid, "b_pyramid", 0, 2) +#else OPT_FLAG (b_bframe_pyramid, "b_pyramid") +#endif /* Use deblocking filter */ OPT_FLAG (b_deblocking_filter, "deblock") @@ -949,7 +953,11 @@ static int x264_encode_video(TCModuleIns * done? */ pic.i_pts = (int64_t) pd->framenum * pd->x264params.i_fps_den; +#if X264_BUILD >= 76 + if (x264_encoder_encode(pd->enc, &nal, &nnal, &pic, &pic_out) < 0) { +#else if (x264_encoder_encode(pd->enc, &nal, &nnal, &pic, &pic_out) != 0) { +#endif return TC_ERROR; } @@ -962,6 +970,10 @@ static int x264_encode_video(TCModuleIns tc_log_error(MOD_NAME, "output buffer overflow"); return TC_ERROR; } +#if X264_BUILD >= 76 + memcpy(outframe->video_buf + outframe->video_len, nal[i].p_payload, nal[i].i_payload); + outframe->video_len += nal[i].i_payload; +#else ret = x264_nal_encode(outframe->video_buf + outframe->video_len, &size, 1, &nal[i]); if (ret < 0 || size > outframe->video_size - outframe->video_len) { @@ -969,6 +981,7 @@ static int x264_encode_video(TCModuleIns break; } outframe->video_len += size; +#endif } /* FIXME: ok, that sucks. How to reformat it ina better way? -- fromani */