Commit c413858f authored by Wim Taymans's avatar Wim Taymans

ext/ffmpeg/gstffmpegdec.c: Be a bit smarter when clipping the frame without a...

ext/ffmpeg/gstffmpegdec.c: Be a bit smarter when clipping the frame without a duration, we don't want the frame to ex...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (clip_video_buffer),
(gst_ffmpegdec_video_frame):
Be a bit smarter when clipping the frame without a duration, we don't
want the frame to extend to the end of the segment in this case.
parent 6b482542
2007-05-25 Wim Taymans <wim@fluendo.com>
* ext/ffmpeg/gstffmpegdec.c: (clip_video_buffer),
(gst_ffmpegdec_video_frame):
Be a bit smarter when clipping the frame without a duration, we don't
want the frame to extend to the end of the segment in this case.
2007-05-24 Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:
......
......@@ -1141,12 +1141,21 @@ clip_video_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
if (G_UNLIKELY (!res))
goto beach;
/* we're pretty sure the duration of this buffer is not till the end of this
* segment (which _clip will assume when the stop is -1) */
if (stop == GST_CLOCK_TIME_NONE)
cstop = GST_CLOCK_TIME_NONE;
/* update timestamp and possibly duration if the clipped stop time is
* valid */
GST_BUFFER_TIMESTAMP (buf) = cstart;
if (GST_CLOCK_TIME_IS_VALID (cstop))
GST_BUFFER_DURATION (buf) = cstop - cstart;
GST_LOG_OBJECT (dec,
"clipped timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
GST_TIME_ARGS (cstart), GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
beach:
GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
return res;
......@@ -1407,6 +1416,9 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
}
}
}
else {
GST_LOG_OBJECT (ffmpegdec, "using in_duration");
}
/* Take repeat_pict into account */
if (GST_CLOCK_TIME_IS_VALID (in_duration)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment