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

MediaPlayer looses current position when playbackRate changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.1, 6.7.0 Beta2
    • Multimedia
    • Linux/X11
    • 554a73e00 (dev), d930927d8 (6.7), e4dd38d8b (6.6), b62efe0f2 (tqtc/lts-6.5)

      When you change the playbackrate of a MediaPlayer instance, the current position will change randomly. For example it will jump back 1 or 2 seconds as soon as you change the playback rate, instead of keeping the position.

      Attached is a minimal reproducable example as zip file.

      Column {
      		anchors.fill: parent
      		MediaPlayer {
      			id: mediaPlayer
      			autoPlay: true
      			source: "https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg"
      			playbackRate: playbackSpeed.currentValue
      			notifyInterval: 32
      		}
      		VideoOutput {
      			source: mediaPlayer
      			Slider {
      				anchors { bottom: parent.bottom; left: parent.left; right: parent.right }
      				to: mediaPlayer.duration
      				value: mediaPlayer.position
      				onMoved: mediaPlayer.seek(position * to);
      			}
      		}
      		Label {
      			text: "Time: " + mediaPlayer.position + " ms"
      		}
      		ComboBox {
      			id: playbackSpeed
      			model: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]
      			currentIndex: 2
      			displayText: currentText + "x"
      			implicitWidth: 64
      		}
      	}
      
      

        For Gerrit Dashboard: QTBUG-87969
        # Subject Branch Project Status CR V

            timblechmann tim blechmann
            vimperator Magnus Groß
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes