From 5310373def8e2b4dbd7dc6def183bdce027e4c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 6 Aug 2007 16:42:22 +0000 Subject: [PATCH] gst/audiotestsrc/gstaudiotestsrc.c: Properly respond to conversion queries. Fixes #464079. Original commit message from CVS: * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_query): Properly respond to conversion queries. Fixes #464079. --- ChangeLog | 5 +++++ gst/audiotestsrc/gstaudiotestsrc.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b0e1e1468..98087619e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-06 Sebastian Dröge + + * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_query): + Properly respond to conversion queries. Fixes #464079. + 2007-08-03 Sebastian Dröge * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init), diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 69e869600a..6d6cd3202d 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -307,7 +307,9 @@ gst_audio_test_src_query (GstBaseSrc * basesrc, GstQuery * query) switch (dest_fmt) { case GST_FORMAT_TIME: /* samples to time */ - dest_val = src_val / src->samplerate; + dest_val = + gst_util_uint64_scale_int (src_val, GST_SECOND, + src->samplerate); break; default: goto error; @@ -317,7 +319,9 @@ gst_audio_test_src_query (GstBaseSrc * basesrc, GstQuery * query) switch (dest_fmt) { case GST_FORMAT_DEFAULT: /* time to samples */ - dest_val = src_val * src->samplerate; + dest_val = + gst_util_uint64_scale_int (src_val, src->samplerate, + GST_SECOND); break; default: goto error;