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  <wingo@pobox.com>

* 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.
This commit is contained in:
Andy Wingo 2005-08-24 15:49:03 +00:00
parent 8aa248c92b
commit 438739a556
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-08-24 Andy Wingo <wingo@pobox.com>
* 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 <thaytan@mad.scientist.com>
* docs/pwg/advanced-types.xml:

View file

@ -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,