xvimagesink: Regression with buffer pool resetting
This is a regression in 1.16, it didn't happen in 1.14. Try e.g. the following file http://samples.mplayerhq.hu/MPEG2/dothack2.mpg
gst-launch-1.0 filesrc location=dothack2.mpg ! decodebin ! xvimagesink
(gst-launch-1.0:3372): GStreamer-CRITICAL **: 19:42:41.564: gst_buffer_resize_range: assertion 'bufmax >= bufoffs + offset + size' failed
Thread 6 "multiqueue0:src" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7fffe7fff700 (LWP 3381)]
_g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
554 ../../../glib/gmessages.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7d70db5 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1 0x00007ffff7d72079 in g_logv
(log_domain=0x7ffff7f5b710 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffe7ffe030) at ../../../glib/gmessages.c:1373
#2 0x00007ffff7d7223f in g_log
(log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7dc1713 "%s: assertion '%s' failed") at ../../../glib/gmessages.c:1415
#3 0x00007ffff7d72a39 in g_return_if_fail_warning
(log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7f5f040 <__func__.23400> "gst_buffer_resize_range", expression=expression@entry=0x7ffff7f5eb08 "bufmax >= bufoffs + offset + size") at ../../../glib/gmessages.c:2771
#4 0x00007ffff7ec243f in gst_buffer_resize_range (buffer=buffer@entry=0x7fffe002c6c0, idx=idx@entry=0, length=1,
length@entry=-1, offset=0, size=666624) at ../subprojects/gstreamer/gst/gstbuffer.c:1665
#5 0x00007ffff7ec2732 in gst_buffer_resize (buffer=buffer@entry=0x7fffe002c6c0, offset=<optimized out>, size=<optimized out>)
at ../subprojects/gstreamer/gst/gstbuffer.c:1605
#6 0x00007ffff7ec5517 in default_reset_buffer (pool=0x7fffdc0ee2b0 [GstXvImageBufferPool], buffer=0x7fffe002c6c0)
at ../subprojects/gstreamer/gst/gstbufferpool.c:1228
#7 0x00007ffff7ec7060 in gst_buffer_pool_release_buffer (pool=0x7fffdc0ee2b0 [GstXvImageBufferPool], buffer=0x7fffe002c6c0)
at ../subprojects/gstreamer/gst/gstbufferpool.c:1361
#8 0x00007ffff7ec00d4 in _gst_buffer_dispose (buffer=0x7fffe002c6c0) at ../subprojects/gstreamer/gst/gstbuffer.c:751
#9 0x00007ffff7ef67f0 in gst_mini_object_unref (mini_object=0x7fffe002c6c0) at ../subprojects/gstreamer/gst/gstminiobject.c:656
#10 0x00007ffff4692e06 in gst_buffer_unref (buf=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.h:446
#11 0x00007ffff4692e06 in gst_ffmpegviddec_decide_allocation (decoder=0x7fffdc0d0690 [avdec_mpeg2video], query=0x7fffdc004190)
at ../subprojects/gst-libav/ext/libav/gstavviddec.c:2120
#12 0x00007ffff725fe75 in gst_video_decoder_negotiate_pool (decoder=0x7fffdc0d0690 [avdec_mpeg2video], caps=<optimized out>)
at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3725
#13 0x00007ffff7269e16 in gst_video_decoder_negotiate (decoder=0x7fffdc0d0690 [avdec_mpeg2video])
at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3939
#14 0x00007ffff4694134 in gst_ffmpegviddec_negotiate
(picture=<optimized out>, context=<optimized out>, ffmpegdec=0x7fffdc0d0690 [avdec_mpeg2video])
at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1355
#15 0x00007ffff4694134 in gst_ffmpegviddec_video_frame
(ret=0x7fffe7ffe4ac, frame=0x5555557ea850, ffmpegdec=0x7fffdc0d0690 [avdec_mpeg2video])
at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1641
#16 0x00007ffff4694134 in gst_ffmpegviddec_frame (ffmpegdec=0x7fffdc0d0690 [avdec_mpeg2video], frame=0x5555557ea850, ret=0x7fffe7ffe4ac)
at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1802
#17 0x00007ffff4695682 in gst_ffmpegviddec_handle_frame (decoder=0x7fffdc0d0690 [avdec_mpeg2video], frame=0x5555557ea850)
at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1925
#18 0x00007ffff725f2bb in gst_video_decoder_decode_frame (decoder=decoder@entry=0x7fffdc0d0690 [avdec_mpeg2video], frame=0x5555557ea850)
at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3401
--Type <RET> for more, q to quit, c to continue without paging--
#19 0x00007ffff72642d8 in gst_video_decoder_chain_forward
(decoder=decoder@entry=0x7fffdc0d0690 [avdec_mpeg2video], buf=buf@entry=0x7fffe0022240, at_eos=at_eos@entry=0)
at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2122
#20 0x00007ffff72649e9 in gst_video_decoder_chain (pad=<optimized out>, parent=<optimized out>, buf=0x7fffe0022240)
at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2437
#21 0x00007ffff7ef9eef in gst_pad_chain_data_unchecked
(pad=pad@entry=0x7fffe0018890 [GstPad], type=type@entry=4112, data=data@entry=0x7fffe0022240)
at ../subprojects/gstreamer/gst/gstpad.c:4399
#22 0x00007ffff7efbfd1 in gst_pad_push_data (pad=pad@entry=0x5555557cbd90 [GstPad], type=type@entry=4112, data=data@entry=0x7fffe0022240)
at ../subprojects/gstreamer/gst/gstpad.c:4655
#23 0x00007ffff7f02e83 in gst_pad_push (pad=0x5555557cbd90 [GstPad], buffer=buffer@entry=0x7fffe0022240)
at ../subprojects/gstreamer/gst/gstpad.c:4774
#24 0x00007ffff7411d67 in gst_base_parse_push_frame (parse=parse@entry=0x7fffe00173b0 [GstMpegvParse], frame=frame@entry=0x7fffdc0049e0)
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2580
#25 0x00007ffff7414b11 in gst_base_parse_handle_and_push_frame (frame=0x7fffdc0049e0, parse=0x7fffe00173b0 [GstMpegvParse])
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2394
#26 0x00007ffff7414b11 in gst_base_parse_finish_frame
(parse=parse@entry=0x7fffe00173b0 [GstMpegvParse], frame=frame@entry=0x7fffdc0049e0, size=size@entry=32958)
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2738
#27 0x00007ffff4715bea in gst_mpegv_parse_handle_frame
(parse=0x7fffe00173b0 [GstMpegvParse], frame=0x7fffdc0049e0, skipsize=<optimized out>)
at ../subprojects/gst-plugins-bad/gst/videoparsers/gstmpegvideoparse.c:730
#28 0x00007ffff740c9a6 in gst_base_parse_handle_buffer
(parse=parse@entry=0x7fffe00173b0 [GstMpegvParse], buffer=<optimized out>, skip=skip@entry=0x7fffe7ffeb5c, flushed=flushed@entry=0x7fffe7ffeb60) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2202
#29 0x00007ffff74129de in gst_base_parse_chain (pad=<optimized out>, parent=<optimized out>, buffer=<optimized out>)
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:3287
#30 0x00007ffff7ef9eef in gst_pad_chain_data_unchecked
(pad=pad@entry=0x5555557cbb40 [GstPad], type=type@entry=4112, data=data@entry=0x5555557d7ea0)
at ../subprojects/gstreamer/gst/gstpad.c:4399
#31 0x00007ffff7efbfd1 in gst_pad_push_data
(pad=pad@entry=0x5555557cb8f0 [GstMultiQueuePad], type=type@entry=4112, data=data@entry=0x5555557d7ea0)
at ../subprojects/gstreamer/gst/gstpad.c:4655
#32 0x00007ffff7f02e83 in gst_pad_push (pad=pad@entry=0x5555557cb8f0 [GstMultiQueuePad], buffer=buffer@entry=0x5555557d7ea0)
at ../subprojects/gstreamer/gst/gstpad.c:4774
#33 0x00007ffff7492bb0 in gst_single_queue_push_one
(allow_drop=<synthetic pointer>, object=0x5555557d7ea0, sq=0x7fffe0011bc0, mq=0x7fffe0012060 [GstMultiQueue])
at ../subprojects/gstreamer/plugins/elements/gstmultiqueue.c:1714
#34 0x00007ffff7492bb0 in gst_multi_queue_loop (pad=<optimized out>) at ../subprojects/gstreamer/plugins/elements/gstmultiqueue.c:2041
--Type <RET> for more, q to quit, c to continue without paging--
#35 0x00007ffff7f2fe7f in gst_task_func (task=0x5555557d7dd0 [GstTask]) at ../subprojects/gstreamer/gst/gsttask.c:328
#36 0x00007ffff7d94404 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../glib/gthreadpool.c:308
#37 0x00007ffff7d93d0d in g_thread_proxy (data=0x7fffe0004400) at ../../../glib/gthread.c:805
#38 0x00007ffff7ca6fb7 in start_thread (arg=<optimized out>) at pthread_create.c:486
#39 0x00007ffff7bd82ef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
CC @ndufresne , IIRC you looked at that recently?