If Info tag[1] isn't present in the MP3 file, GStreamer trys to read some more frames from the file to estimate a duration. Then, it sends a duration-changed message to winegstreamer. However, it seems not to send the message if the file is too short to estimate the duration, e.g. 0.5 seconds. Winegstreamer gets stuck in this case.
This patch removes Info tag from dlls/quartz/tests/test.mp3 and fixes the above issue by watching pad's EOS events.
[1] http://gabriel.mp3-tech.org/mp3infotag.html
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/quartz/tests/rsrc.rc | 2 +- dlls/quartz/tests/test.mp3 | Bin 2349 -> 2157 bytes dlls/winegstreamer/gstdemux.c | 13 ++++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=73175
Your paranoid android.
=== wxppro (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w2008s64 (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w8 (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w8adm (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1507 (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809 (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_2scr (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_ar (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_he (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_ja (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_zh_CN (32 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w2008s64 (64 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w864 (64 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1507 (64 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809 (64 bit report) ===
quartz: mpegsplit.c:690: Test failed: Format blocks didn't match. mpegsplit.c:761: Test failed: Format blocks didn't match. mpegsplit.c:782: Test failed: Format blocks didn't match.
=== w1064v1809_he (32 bit report) ===
quartz: vmr9.c:1433: Test failed: Thread should block in Receive().
=== debiant (32 bit report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0
=== debiant (32 bit French report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0
=== debiant (32 bit Japanese:Japan report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 videorenderer.c:1054: Test failed: Got time e005a00000001.
=== debiant (32 bit Chinese:China report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0
=== debiant (32 bit WoW report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0
=== debiant (64 bit WoW report) ===
quartz: filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0 filtergraph.c:385: Test failed: got 0 filtergraph.c:534: Test succeeded inside todo block: expected 0, got 0
So, first of all, this patch causes test failures. That's partly an effect of the mp3 tag data now changing, so you'll need to update the test to match.
Then it breaks the builtin quartz:filtergraph tests. While that makes sense given that we're no longer successfully parsing duration out of the file, it's not particularly ideal. And given that I've got some half-finished tests for seeking on parser filters locally, I'd kind of prefer that we can at least seek one file.
This caught my eye, though, because I recently submitted a patch to GStreamer for mpegaudioparse that improved its seeking logic, and yet even with that patch I was still getting a failure to query duration. After some time debugging I noticed some rather obvious problems with our duration queries. I'll send some patches which should make that test failure go away.
Anyway, this patch is a clear improvement, but what worries me is that it's not *enough*. One problem is that the larger the file, the longer we take to wait for EOS. I've seen a 45-minute mp3 file with no headers in the wild, and that makes connection take 3-5 seconds on my machine. I don't have a good solution for this, so I'm willing to accept the patch in the meantime. Possibly the best option is to also add a short timeout to the WaitForMultipleObjects() call.