Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131465

[ffmpeg] race condition in looped playback (discovered through tst_QMediaPlayerBackend being flaky)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1
    • Multimedia
    • None

    Description

      tst_QMediaPlayerBackend::play_playbackLastsForTheExpectedTime seems to be flaky:

          3556: ********* Start testing of tst_QMediaPlayerBackend *********
          FAIL!  : tst_QMediaPlayerBackend::play_playbackLastsForTheExpectedTime(file qrc:/testdata/busMpeg4.mp4, loops 2, rate 1, pause before 1) 'abs(duration - expectedDuration) < 600ms' returned FALSE. (expected duration: 2000ms, actual duration: 1014ms)
             Loc: [/home/qt/work/qt/qtmultimedia/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp(1720)]
          Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/tst_qmediaplayerbackend.VTvzBS.mp4':
            Metadata:
          FAIL!  : tst_QMediaPlayerBackend::play_playbackLastsForTheExpectedTime(file qrc:/testdata/busMpeg4.mp4, loops 2, rate 0.5, pause before 1) 'abs(duration - expectedDuration) < 600ms' returned FALSE. (expected duration: 4000ms, actual duration: 2032ms)
             Loc: [/home/qt/work/qt/qtmultimedia/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp(1720)]
          Input #0, wav, from '/tmp/tst_qmediaplayerbackend.uebPqK.wav':
            Duration: 00:00:01.00, bitrate: 705 kb/s
          Totals: 198 passed, 2 failed, 9 skipped, 0 blacklisted, 331294ms
          
          
          13313: ********* Start testing of tst_QMediaPlayerBackend *********
          FAIL!  : tst_QMediaPlayerBackend::play_playbackLastsForTheExpectedTime(file qrc:/testdata/busMpeg4.mp4, loops 2, rate 0.5, pause before 1) 'abs(duration - expectedDuration) < 600ms' returned FALSE. (expected duration: 4000ms, actual duration: 2037ms)
             Loc: [/home/qt/work/qt/qtmultimedia/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp(1720)]
          PASS   : tst_QMediaPlayerBackend::cleanupTestCase()
          Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 2547ms
          
          
          14194: ********* Start testing of tst_QMediaPlayerBackend *********
          FAIL!  : tst_QMediaPlayerBackend::play_playbackLastsForTheExpectedTime(file qrc:/testdata/busMpeg4.mp4, loops 2, rate 0.5, pause before 1) 'abs(duration - expectedDuration) < 600ms' returned FALSE. (expected duration: 4000ms, actual duration: 2036ms)
             Loc: [/home/qt/work/qt/qtmultimedia/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp(1720)]
          PASS   : tst_QMediaPlayerBackend::cleanupTestCase()
          Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 2545ms
      

      compare:
      https://testresults.qt.io/logs/qt/qtmultimedia/c18c436124a37838ee8090bc5f6e64df5dfd5a9f/LinuxUbuntu_22_04x86_64LinuxUbuntu_22_04x86_64GCCqtci-linux-Ubuntu-22.04-x86_64-51-e8468bSccache_TestDocs_TestOnly/c88cb678bc24d1640e7642a55aa7c01c0e08e406/test_1732209990/log.txt.gz

      observations:

      • test fails with the ffmpeg backend
      • test failures are spurious
      • test fail when the loop count is 2, because the actual playback duration is roughly half of the actual playback duration.

      this smells like a race condition in the looping machinery of the ffmpeg backend, where the playback stops instead of seeking to the beginning

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtmultimediateam Qt Multimedia Team
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes