Videomixer fails with assert if its sink pad offset is set to negative value and the absolute value of offset is greater than pipeline running time
Submitted by Yury Mukhitov
Link to original bug (#796862)
Description
Expected behavior: Setting pad offset to negative value usually results in media stream being "shifted forward" by the amout of offset.
Observed behavior: If setting pad offset to negative value which absolute value is greater than the pipeline running time videomixer fails with assert.
Pipeline structure:
$ gst-launch-1.0 videotestsrc ! videomixer ! ximagesink
How to reproduce:
Have pipeline running for N seconds then set videomixer's pad offset to -(N+1) seconds (e.g. to skip some video frames).
I have an example application which reproduces this problem.
Regards,
Yury
GStreamer console output:
=============================ERROR:videomixer2.c:961:gst_videomixer2_fill_queues: assertion failed: (start_time != -1 && end_time != -1)
Application backtrace:
=============================#0 0x00007f27370201d7 in raise () at /lib64/libc.so.6
#1 0x00007f27370218c8 in abort () at /lib64/libc.so.6
#2 0x00007f27391d50c5 in g_assertion_message () at /lib64/libglib-2.0.so.0
#3 0x00007f27391d515a in g_assertion_message_expr () at /lib64/libglib-2.0.so.0
#4 0x00007f272c879f1e in gst_videomixer2_fill_queues (mix=0x26b00c0, output_start_time=2100000000, output_end_time=2133333333)
at videomixer2.c:961
#5 0x00007f272c87b53a in gst_videomixer2_collected (pads=0x26b20d0, mix=0x26b00c0) at videomixer2.c:1285
#6 0x00007f273855ca1e in gst_collect_pads_check_collected (pads=0x26b20d0) at gstcollectpads.c:1368
#7 0x00007f273855eadd in gst_collect_pads_chain (pad=0x26b82d0, parent=0x26b00c0, buffer=0x7f271c0313e0) at gstcollectpads.c:2216
#8 0x00007f2739756b53 in gst_pad_chain_data_unchecked (pad=0x26b82d0, type=4112, data=0x7f271c0313e0) at gstpad.c:4205
#9 0x00007f2739757732 in gst_pad_push_data (pad=0x26ac040, type=4112, data=0x7f271c0313e0) at gstpad.c:4457
#10 0x00007f2739757e00 in gst_pad_push (pad=0x26ac040, buffer=0x7f271c0313e0) at gstpad.c:4576
#11 0x00007f2738546d4d in gst_base_src_loop (pad=0x26ac040) at gstbasesrc.c:2854
#12 0x00007f27397924b9 in gst_task_func (task=0x26c8050) at gsttask.c:334
#13 0x00007f273979365a in default_func (tdata=0x26b3010, pool=0x24e2910) at gsttaskpool.c:68
#14 0x00007f27391d68bc in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#15 0x00007f27391d5f20 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#16 0x00007f2737bd4dc5 in start_thread () at /lib64/libpthread.so.0
#17 0x00007f27370e276d in clone () at /lib64/libc.so.6
Version: 1.14.2