omxmjpegdec doesn't stop processing after receiving EOS
Submitted by chw..@..oo.com
Link to original bug (#742172)
Description
To reproduce:
- gst-launch-1.0 -e filesrc location=
<any mjpeg encoded video file>
!<fileformat>
emux ! omxmjpegdec ! fakesink
2a. either wait for the video conversion to be "completed"
2b. or press Ctrl+C to interrupt the process - gst-launch-1.0 stucks at "Waiting for EOS..."
Note: I reproduced this bug with three mjpeg encoded files, with different formats and resolutions.
The command gst-launch-1.0 -e filesrc location=<any mjpeg encoded video file> ! <demuxer> ! omxmjpegdec ! fakesink
gives the following output:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^
Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Then it hangs until I interrupt it again
Partial log of the same command with --gst-debug=4:
<SNIP>
handling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
0:00:06.398498069 13399 0x1b11350 INFO GST_SCHEDULING gstpad.c:4275:gst_pad_get_range_unchecked:filesrc0:src getrange failed, flow: eos
0:00:06.398854065 13399 0x1b11350 INFO GST_SCHEDULING gstpad.c:4478:gst_pad_pull_range:qtdemux0:sink pullrange failed, flow: eos
0:00:06.615163362 13399 0x1d0be00 INFO h264parse gsth264parse.c:1326:gst_h264_parse_update_src_caps:<h264parse0>
setting framerate in caps
0:00:06.615507358 13399 0x1d0be00 INFO baseparse gstbaseparse.c:3623:gst_base_parse_set_latency:<h264parse0>
min/max latency 0:00:00.066666666, 0:00:00.066666666
handling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:14.645657038
Setting pipeline to PAUSED ...
<SNIP>
Remarks:
- It also breaks decodebin because decodebin may use omxmjpegdec to decode mjpeg videos
Workaround:
- use jpegdec instead of omxmjpegdec
Other users that are probably affected by this issue:
http://www.raspberrypi.org/forums/viewtopic.php?t=52797
https://stackoverflow.com/questions/18234107/gstreamer-hangs-while-generating-timelapse-from-jpegs-on-raspberry-pi
Version: 1.2.0