Comparing a Gst_BUFFER_TIMESTAMP
Olivier Crête
olivier.crete at collabora.com
Wed Dec 26 08:59:53 PST 2012
Hello,
On Tue, 2012-12-25 at 23:12 -0800, iron_guitarist1987 wrote:
> Hello all,
>
> I have a pipeline with some custom plugins. When I run the pipeline, my
> first buffer ( in milliseconds) is negative. When I try to add the lines
> below, it doesn't work. For some reason, it thinks the negative number is
> actually positive
>
> #define GST_TIME_MS(buf) GST_TIME_AS_MSECONDS(GST_BUFFER_TIMESTAMP(buf))
>
> if(GST_TIME_MS(buf) < 0){
> gst_buffer_unref(buf)
> return GST_FLOW_OK;
> }
>
> The if never runs, even when the first timestamp is negative.
The type used for timestamps (GstClockTime) is unsigned, so it will
never be negative.
--
Olivier Crête
olivier.crete at collabora.com
More information about the gstreamer-devel
mailing list