mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
theoraenc: fix comparison to unset timestamp
Also rejects negative timestamps that aren't GST_CLOCK_TIME_NONE. Coverity 1139797
This commit is contained in:
parent
55f98974a8
commit
e7c261ff31
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue