After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791348 - interaudio: Drain samples before setting new caps
interaudio: Drain samples before setting new caps
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 781721
Blocks:
 
 
Reported: 2017-12-07 15:21 UTC by Carlos Rafael Giani
Modified: 2018-11-03 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
interaudiosrc caps change sample drain patch (2.76 KB, patch)
2017-12-07 15:22 UTC, Carlos Rafael Giani
none Details | Review
interaudiosrc caps change sample drain patch v2 (2.76 KB, patch)
2017-12-07 15:36 UTC, Carlos Rafael Giani
needs-work Details | Review

Description Carlos Rafael Giani 2017-12-07 15:21:34 UTC
Currently, when caps change, any samples remaining inside the channel are thrown away, causing data loss. Fix this by draining them before the caps are changed in gst_inter_audio_sink_set_caps().
Comment 1 Carlos Rafael Giani 2017-12-07 15:22:23 UTC
Created attachment 365200 [details] [review]
interaudiosrc caps change sample drain patch
Comment 2 Carlos Rafael Giani 2017-12-07 15:36:21 UTC
Created attachment 365205 [details] [review]
interaudiosrc caps change sample drain patch v2

Previous version incorrectly removed a g_mutex_unlock call.
Comment 3 Tim-Philipp Müller 2018-01-25 23:13:52 UTC
Makes sense. Any chance to get a unit test as well? Shouldn't be very complicated - push caps1, buffer1, caps2, buffer2 and check output?
Comment 4 Carlos Rafael Giani 2018-01-26 13:31:34 UTC
Right, makes sense. It is odd though that the inter plugin seems to come with its own integrated test code (gstintertest.c). Isn't this duplicating test framework functionality?
Comment 5 Tim-Philipp Müller 2018-02-05 23:47:39 UTC
Comment on attachment 365205 [details] [review]
interaudiosrc caps change sample drain patch v2

Doesn't compile when applied to master.
Comment 6 GStreamer system administrator 2018-11-03 14:16:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/637.