From 438739a556e8df3196e23381d1c1e5d59cee800f Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 24 Aug 2005 15:49:03 +0000 Subject: [PATCH] gst/gstquery.c (gst_query_new_convert): Spew if we try to convert a negative value. Doesn't make much sense. Mostly t... Original commit message from CVS: 2005-08-24 Andy Wingo * gst/gstquery.c (gst_query_new_convert): Spew if we try to convert a negative value. Doesn't make much sense. Mostly this is here to force callers to ensure -1 maps to -1. --- ChangeLog | 6 ++++++ gst/gstquery.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0e5e225..f3f238a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-24 Andy Wingo + + * gst/gstquery.c (gst_query_new_convert): Spew if we try to + convert a negative value. Doesn't make much sense. Mostly this is + here to force callers to ensure -1 maps to -1. + 2005-08-24 Jan Schmidt * docs/pwg/advanced-types.xml: diff --git a/gst/gstquery.c b/gst/gstquery.c index ed66efc..ff0867a 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -368,6 +368,8 @@ gst_query_new_convert (GstFormat src_fmt, gint64 value, GstFormat dest_fmt) GstQuery *query; GstStructure *structure; + g_return_val_if_fail (value >= 0, NULL); + structure = gst_structure_new ("GstQueryConvert", "src_format", GST_TYPE_FORMAT, src_fmt, "src_value", G_TYPE_INT64, value, -- 2.7.4