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 696411 - audiotestsrc: incorrect data size in last buffer
audiotestsrc: incorrect data size in last buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-22 17:36 UTC by ksb
Modified: 2013-03-24 20:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gstaudiotestsrc.c (1.40 KB, patch)
2013-03-22 17:36 UTC, ksb
committed Details | Review

Description ksb 2013-03-22 17:36:34 UTC
Created attachment 239567 [details] [review]
Patch for gstaudiotestsrc.c

In audiotestsrc, the last buffer before EOS may be smaller than the maximum size. The current code doesn't adjust for this (only sets the duration and offsets, if this is enough then wavenc is broken).
The test program for bug 676884 can be used for this one too.

I've attached a patch that I hope fixes both bug 676884 and this one.
There might be a way to call gst_buffer_set_size only when necessary but I'm not sure how to do it in a way that's more efficient than the how it's done gst_buffer_set_size.
Comment 1 Tim-Philipp Müller 2013-03-24 20:55:06 UTC
Thanks, makes sense.

Would be great if you could provide patches in "git format-patch" format next time.


commit f18d2a5a9a27de45539089b2f3a38bddf74cd784
Author: Simon Berg <ksb@kth.se>
Date:   Sun Mar 24 20:44:58 2013 +0000

    audiotestsrc: fix rounding errors that might cause segments to be one sample too short
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676884

commit d8b42e993b6f836f7c11baacbf6ee5dea84b67b0
Author: Simon Berg <ksb@kth.se>
Date:   Sun Mar 24 20:41:44 2013 +0000

    audiotestsrc: fix buffer size of last buffer
    
    The last buffer before EOS may be smaller than the maximum
    size. The current code doesn't adjust for this, it only sets
    the duration and offsets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696411