gst-launch stalls when attempting to exit after playing back audio or video file
Submitted by Dinesh Iyer
Link to original bug (#795554)
Description
Created attachment 371397
H.264 encoded MP4 file that is 4.7 seconds long and has 141 frames
I am having trouble using gst-launch on Debian 9 (Gstreamer version 1.10.4) with MP4 files. I have experienced the same issue in Ubuntu 18.04 which I believe runs 1.12.x.
I have not observed this when using Gstreamer 1.4.4
I have been able to reproduce this when playing MP4, MPG, Uncompressed AVI and even an MP3 file.
Here is the pipeline I am using below to play video files:
gst-launch-1.0 playbin uri=file://xylophone.mp4 video-sink=appsink
I get:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
The file duration is 4.7 seconds. Even after say 10 seconds, the gst-launch command does not exit unlike in 1.4.4.
After that when I execute Ctrl+C, I see the following on the screen:^
C handling interrupt.
Interrupt: Stopping pipeline ...Execution ended after 0:02:39.636421528Setting pipeline to PAUSED ...
Again the system stalls and the stack trace looks like: https://drive.google.com/open?id=1MzKpg-eIKCZQhs7fkGoFmB3L0t-72GUw
The stall appears to happen when pipeline is being moved from PLAYING->PAUSED.
When I switch the video-sink to xvimagesink or fakesink, it works fine.
This is similar to a stall I get when I am using my application to read frames out of a video file and I am attempting to shutdown my video reading portion by setting the pipeline to NULL.
Attachment 371397, "H.264 encoded MP4 file that is 4.7 seconds long and has 141 frames":
xylophone