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

MediaPlayer looses current position when playbackRate changes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.1
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      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
      		}
      	}
      
      

        Attachments

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

          Activity

            People

            Assignee:
            valentyn.doroshchuk Valentyn Doroshchuk
            Reporter:
            vimperator Magnus Groß
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes