theoraenc: fix comparison to unset timestamp
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 09:45:21 +0000 (10:45 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 10 Apr 2014 10:06:00 +0000 (11:06 +0100)
Also rejects negative timestamps that aren't GST_CLOCK_TIME_NONE.

Coverity 1139797

ext/theora/gsttheoraenc.c

index f996c2c..5196ae9 100644 (file)
@@ -888,7 +888,8 @@ theora_enc_handle_frame (GstVideoEncoder * benc, GstVideoCodecFrame * frame)
   running_time =
       gst_segment_to_running_time (&GST_VIDEO_ENCODER_INPUT_SEGMENT (enc),
       GST_FORMAT_TIME, timestamp);
-  g_return_val_if_fail (running_time >= 0 || timestamp < 0, GST_FLOW_ERROR);
+  g_return_val_if_fail (running_time >= 0 || timestamp == GST_CLOCK_TIME_NONE,
+      GST_FLOW_ERROR);
 
   GST_OBJECT_LOCK (enc);
   if (enc->bitrate_changed) {