mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
b46718b1a0
In reverse playback we were not taking into account the current buffer samples to check if we had reached EOS which was leading to a buffer with PTS = CLOCK_TIME_NONE containing too many frames followed by a useless buffer with pts=0 duration=0, and a g_critical issue in gst_object_sync_values. Also add a validate based test case. Without that patch this is how the expectation fails: ``` diff --- log-asink-sink-expected 2020-05-22 23:22:42.654384579 -0400 +++ log-asink-sink-actual 2020-05-22 23:29:35.671586380 -0400 @@ -27,5 +27,6 @@ buffer: pts=0:00:00.058820861, due=0:00:00.023219955, flags=discont buffer: pts=0:00:00.035600907, due=0:00:00.023219954, flags=discont buffer: pts=0:00:00.012380952, due=0:00:00.023219955, flags=discont -buffer: pts=0:00:00.000000000, due=0:00:00.012380952, flags=discont +buffer: due=0:00:00.012380953, flags=discont +buffer: pts=0:00:00.000000000, flags=discont event eos: (no structure) ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667>
24 lines
No EOL
759 B
Text
24 lines
No EOL
759 B
Text
meta,
|
|
args = {
|
|
"audiotestsrc name=src samplesperbuffer=1024 ! audio/x-raw,format=S16LE,rate=44100 ! fakesink name=asink sync=true",
|
|
},
|
|
configs = {
|
|
"$(validateflow), pad=asink:sink, record-buffers=true",
|
|
},
|
|
handles-states=true,
|
|
ignore-eos=true
|
|
|
|
play;
|
|
seek, start=0.0, stop=0.5, rate=-1.0, flags=accurate+flush
|
|
|
|
crank-clock, expected-time=0.0
|
|
|
|
# roundup((44100 / 2 / 1024) - 1 (already cranked) + 1 (for eos)) = 22
|
|
crank-clock, repeat=22
|
|
|
|
set-property, target-element-name="src", property-name="samplesperbuffer", property-value=4410, on-message=eos
|
|
seek, start=0.0, stop=1.0, rate=-1.0, flags=accurate+flush
|
|
crank-clock, expected-elapsed-time=0.0
|
|
crank-clock, repeat=10, expected-elapsed-time=0.1
|
|
|
|
stop, on-message=eos; |