From 19141759c16866d42dfcc2cf2df345bab16e1108 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 30 Aug 2011 19:02:51 -0700 Subject: [PATCH] theoraenc: Use GAP flag when possible Set TH_ENCCTL_SET_DUPLICATE_FLAG when we see a gap flag, to indicate to the encoder that the current frame is a duplicate of the previous frame. --- ext/theora/gsttheoraenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 5d220625f1..de2fcfeab6 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -1376,6 +1376,11 @@ theora_enc_encode_and_push (GstTheoraEnc * enc, ogg_packet op, goto multipass_read_failed; } } +#ifdef TH_ENCCTL_SET_DUPLICATE_FLAG + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP)) { + th_encode_ctl (enc->encoder, TH_ENCCTL_SET_DUPLICATE_FLAG, NULL, 0); + } +#endif res = th_encode_ycbcr_in (enc->encoder, ycbcr); /* none of the failure cases can happen here */