mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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:
parent
6f397125d1
commit
5310373def
2 changed files with 11 additions and 2 deletions
|
@ -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>
|
||||
|
||||
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue