From 6973a668136bd613adb440d20f09e47baef2c052 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 25 Sep 2012 17:19:15 +0200 Subject: [PATCH] videoencoder: clip input buffers to current input segment ... rather than to output segment, which will only be set to current input segment if some output is produced (coming from non-clipped input). Also fixup debug message. --- gst-libs/gst/video/gstvideoencoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c index d8a5ec2..2fa0af8 100644 --- a/gst-libs/gst/video/gstvideoencoder.c +++ b/gst-libs/gst/video/gstvideoencoder.c @@ -1259,7 +1259,7 @@ gst_video_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) GST_LOG_OBJECT (encoder, "received buffer of size %" G_GSIZE_FORMAT " with PTS %" GST_TIME_FORMAT - ", PTS %" GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, + ", DTS %" GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, gst_buffer_get_size (buf), GST_TIME_ARGS (pts), GST_TIME_ARGS (dts), GST_TIME_ARGS (duration)); @@ -1275,7 +1275,7 @@ gst_video_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) stop = GST_CLOCK_TIME_NONE; /* Drop buffers outside of segment */ - if (!gst_segment_clip (&encoder->output_segment, + if (!gst_segment_clip (&encoder->input_segment, GST_FORMAT_TIME, start, stop, &cstart, &cstop)) { GST_DEBUG_OBJECT (encoder, "clipping to segment dropped frame"); gst_buffer_unref (buf); -- 2.7.4