GNOME Bugzilla – Bug 759338
pnmdec stalls when queue with min-threshold-buffers>1 is used
Last modified: 2018-11-03 13:44:18 UTC
A pipeline using multifilesrc + pnmdec + queue with min-threshold-buffers>1 stalls after/during reading the second file. This pipeline (using pngdec) runs fine: gst-launch-1.0 --gst-debug=*:3,multifilesrc:5,pnmdec:5 multifilesrc index=0 name=filesrc location=\"/tmp/frame%04d.png\" caps=\"image/png, framerate=10/1\" ! pngdec ! queue min-threshold-buffers=2 ! fakesink async=0 sync=1 if however we swapt to PNM files (pnmdec) it stalls after reading the first image: gst-launch-1.0 --gst-debug=*:3,multifilesrc:5,pnmdec:5 multifilesrc index=0 name=filesrc location=\"frame%04d.ppm\" caps=\"image/x-portable-graymap, framerate=10/1\" ! pnmdec ! queue min-threshold-buffers=2 ! fakesink async=0 sync=1 ... 0:00:00.029443520 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:388:gst_multi_file_src_get_filename: 0 0:00:00.029504276 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:421:gst_multi_file_src_create:<filesrc> reading from file "frame0000.ppm". 0:00:00.030860164 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:463:gst_multi_file_src_create:<filesrc> read file "frame0000.ppm". 0:00:00.031033479 6172 0x6d3140 WARN videodecoder gstvideodecoder.c:2479:gst_video_decoder_chain:<pnmdec0> Received buffer without a new-segment. Assuming timestamps start from 0. 0:00:00.033083984 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:388:gst_multi_file_src_get_filename: 1 0:00:00.033214362 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:421:gst_multi_file_src_create:<filesrc> reading from file "frame0001.ppm". 0:00:00.034374941 6172 0x6d3140 DEBUG multifilesrc gstmultifilesrc.c:463:gst_multi_file_src_create:<filesrc> read file "frame0001.ppm". if we set min-threshold-buffers to 1 it runs fine: gst-launch-1.0 --gst-debug=*:3,multifilesrc:5,pnmdec:5 multifilesrc index=0 name=filesrc location=\"frame%04d.ppm\" caps=\"image/x-portable-graymap, framerate=10/1\" ! pnmdec ! queue min-threshold-buffers=1 ! fakesink async=0 sync=1 I imagine the problem is in pnmdec since it runs fine with pngdec. I get no errors or any hints of the problem with the debug levels used...
The problem here is that there's an ALLOCATION query, then a buffer is pushed and makes it into the queue, then another ALLOCATION query happens, which now waits (blocks) for the other buffer to be processed, which will never happen, because there's only 1 buffer but min-threshold-buffers has been set to 2. You can workaround it by putting a tee in front of the queue, fwiw.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/336.