python: Fix the audiotestsrc example

Since 830d1595b9 AudioInfo::from_caps has been hidden in python

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2737>
This commit is contained in:
Thibault Saunier 2022-06-28 16:38:09 -04:00 committed by Tim-Philipp Müller
parent fa4f45b8d3
commit c9e13f8834

View file

@ -86,7 +86,7 @@ class AudioTestSrc(GstBase.BaseSrc):
self.set_format(Gst.Format.TIME)
def do_set_caps(self, caps):
self.info.from_caps(caps)
self.info = GstAudio.AudioInfo.new_from_caps(caps)
self.set_blocksize(self.info.bpf * SAMPLESPERBUFFER)
return True