GNOME Bugzilla – Bug 696411
audiotestsrc: incorrect data size in last buffer
Last modified: 2013-03-24 20:55:56 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.
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