Setting the pipeline to pause then playing several times makes the pipeline crazy


I’m currently creating a widget with “appsink” to give a video player to (Golang). I’m using go-gst package and that works very well. The Go package uses the libgst 1.26.

The only problem that I have is that when I set the pipeline to PAUSED, then PLAYING again, sometimes (often actually), the stream starts to be crazy… The sound is OK, but the video jumps to future frames and it’s impossible to return to a normal state. Even if I pause / play again.

Here is the pipeline:

   filesrc name=input location="myfile.webm" !
    decodebin name=decode use-buffering=true

    decode. !
    videoconvert !
    videorate name=videorate !
    videoscale !
    jpegenc name=imageencoder !
    appsink name=goapp sync=true max-lateness=33333333

    decode. !
    audioconvert !
    audioresample !
    autoaudiosink sync=true

Note that the playing state is OK, it is smooth and works very well. And that sometimes, PAUSED then PLAY is OK.

I also tried to add queue after each convert elements, nothing changed.

If you have a solution… thank :slight_smile:

That’s interesting, and it renders fine with a dedicated video sink?

Sometimes no…

It’s possible that a bug exists with de Fedora package.

I’m investigating.

I found a workaround, on pause, I seek the current position. Il forces all the elements to sync.

I have seen some issues with using PAUSED and PLAYING when playing back a file. I only found a workaround in my case, which was to sen a FLUSH event through the pipeline and then seek the time at which it was paused.

There might be some elements that are not able to properly handle the change in state.