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.
This commit is contained in:
Sebastian Dröge 2007-08-06 16:42:22 +00:00
parent 6f397125d1
commit 5310373def
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-08-06 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_query):
Properly respond to conversion queries. Fixes #464079.
2007-08-03 Sebastian Dröge <slomo@circular-chaos.org> 2007-08-03 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init), * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),

View file

@ -307,7 +307,9 @@ gst_audio_test_src_query (GstBaseSrc * basesrc, GstQuery * query)
switch (dest_fmt) { switch (dest_fmt) {
case GST_FORMAT_TIME: case GST_FORMAT_TIME:
/* samples to time */ /* samples to time */
dest_val = src_val / src->samplerate; dest_val =
gst_util_uint64_scale_int (src_val, GST_SECOND,
src->samplerate);
break; break;
default: default:
goto error; goto error;
@ -317,7 +319,9 @@ gst_audio_test_src_query (GstBaseSrc * basesrc, GstQuery * query)
switch (dest_fmt) { switch (dest_fmt) {
case GST_FORMAT_DEFAULT: case GST_FORMAT_DEFAULT:
/* time to samples */ /* time to samples */
dest_val = src_val * src->samplerate; dest_val =
gst_util_uint64_scale_int (src_val, src->samplerate,
GST_SECOND);
break; break;
default: default:
goto error; goto error;