videorate: assertion failing when receiving buffer from pngdec
$ gst-launch-1.0 filesrc location=./common/tests/sample.png ! pngdec ! videorate ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
**
ERROR:../subprojects/gst-plugins-base/gst/videorate/gstvideorate.c:714:gst_video_rate_push_buffer: assertion failed: (GST_BUFFER_DURATION_IS_VALID (outbuf))
Bail out! ERROR:../subprojects/gst-plugins-base/gst/videorate/gstvideorate.c:714:gst_video_rate_push_buffer: assertion failed: (GST_BUFFER_DURATION_IS_VALID (outbuf))
Aborted (core dumped)
#0 0x00007f1a1bab19e5 in raise () at /lib64/libc.so.6
#1 0x00007f1a1ba9a8a4 in abort () at /lib64/libc.so.6
#2 0x00007f1a1bcdab6c in g_assertion_message_expr.cold () at /lib64/libglib-2.0.so.0
#3 0x00007f1a1bd353bf in g_assertion_message_expr () at /lib64/libglib-2.0.so.0
#4 0x00007f1a1a8226e1 in gst_video_rate_push_buffer (videorate=0x24b1cd0, outbuf=0x7f1a14059000, duplicate=<optimized out>, next_intime=<optimized out>) at ../subprojects/gst-plugins-base/gst/videorate/gstvideorate.c:714
#5 0x00007f1a1a8264be in gst_video_rate_sink_event (trans=0x24b1cd0, event=0x7f1a14005030) at ../subprojects/gst-plugins-base/gst/videorate/gstvideorate.c:911
#6 0x00007f1a1be90cec in gst_pad_send_event_unchecked (pad=pad@entry=0x261e740, event=event@entry=0x7f1a14005030, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../subprojects/gstreamer/gst/gstpad.c:5897
#7 0x00007f1a1be9134e in gst_pad_push_event_unchecked (pad=pad@entry=0x261e4f0, event=0x7f1a14005030, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../subprojects/gstreamer/gst/gstpad.c:5541
#8 0x00007f1a1be91806 in push_sticky (pad=pad@entry=0x261e4f0, ev=ev@entry=0x7f1a1a7409f0, user_data=user_data@entry=0x7f1a1a740a50) at ../subprojects/gstreamer/gst/gstpad.c:4044
#9 0x00007f1a1be8f280 in events_foreach (pad=pad@entry=0x261e4f0, func=func@entry=0x7f1a1be917b0 <push_sticky>, user_data=user_data@entry=0x7f1a1a740a50) at ../subprojects/gstreamer/gst/gstpad.c:605
#10 0x00007f1a1be9a400 in check_sticky (event=0x7f1a14005030, pad=0x261e4f0) at ../subprojects/gstreamer/gst/gstpad.c:4103
#11 gst_pad_push_event (pad=0x261e4f0, event=0x7f1a14005030) at ../subprojects/gstreamer/gst/gstpad.c:5672
#12 0x00007f1a1bdf38a6 in gst_pngdec_sink_event (bdec=0x2603000, event=0x7f1a14005030) at ../subprojects/gst-plugins-good/ext/libpng/gstpngdec.c:595
#13 0x00007f1a1be90cec in gst_pad_send_event_unchecked (pad=pad@entry=0x261e2a0, event=event@entry=0x7f1a14005030, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../subprojects/gstreamer/gst/gstpad.c:5897
#14 0x00007f1a1be9134e in gst_pad_push_event_unchecked (pad=pad@entry=0x261e050, event=0x7f1a14005030, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../subprojects/gstreamer/gst/gstpad.c:5541
#15 0x00007f1a1be91806 in push_sticky (pad=pad@entry=0x261e050, ev=ev@entry=0x7f1a1a740c80, user_data=user_data@entry=0x7f1a1a740ce0) at ../subprojects/gstreamer/gst/gstpad.c:4044
#16 0x00007f1a1be8f280 in events_foreach (pad=pad@entry=0x261e050, func=func@entry=0x7f1a1be917b0 <push_sticky>, user_data=user_data@entry=0x7f1a1a740ce0) at ../subprojects/gstreamer/gst/gstpad.c:605
#17 0x00007f1a1be9a400 in check_sticky (event=0x7f1a14005030, pad=0x261e050) at ../subprojects/gstreamer/gst/gstpad.c:4103
#18 gst_pad_push_event (pad=pad@entry=0x261e050, event=event@entry=0x7f1a14005030) at ../subprojects/gstreamer/gst/gstpad.c:5672
#19 0x00007f1a1a938719 in gst_base_src_loop (pad=0x261e050) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:3115
#20 0x00007f1a1bec7eaf in gst_task_func (task=0x2621290) at ../subprojects/gstreamer/gst/gsttask.c:384
#21 0x00007f1a1bd40fa4 in g_thread_pool_thread_proxy.lto_priv () at /lib64/libglib-2.0.so.0
#22 0x00007f1a1bd3e402 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#23 0x00007f1a1bc483f9 in start_thread () at /lib64/libpthread.so.0
#24 0x00007f1a1bb754c3 in clone () at /lib64/libc.so.6
-
videorate
receives a single buffer withpts = 0, duration = invalid
; - then it receives
eos
triggering this buffer to be pushed downstream; - we hit this assertion as this code assumes
transform_ip
set a valid duration while it doesn't as we received only one buffer.
What would be the proper way to handle this? Just push the buffer without any duration set?