<div dir="ltr"><div style="font-size:14px">Hello Francois Gouget,</div><div style="font-size:14px"><br></div><div style="font-size:14px">While applying and testing your patches supporting VP8 and H264, I had an issue that VM gets hung when playing video. From gstack, it seems stuck in gstreamer. Please check the details below, and let me know what might be wrong. Thank you.</div><div style="font-size:14px"><br></div><div style="font-size:14px"><br></div><div style="font-size:14px">- OS: CentOS 7</div><div style="font-size:14px">- Patches from git server</div><div style="font-size:14px">    <a href="https://github.com/fgouget/spice/tree/gst" target="_blank">https://github.com/fgouget/spice/tree/gst</a></div><div style="font-size:14px">    <a href="https://github.com/fgouget/spice-gtk/tree/gst" target="_blank">https://github.com/fgouget/spice-gtk/tree/gst</a></div><div style="font-size:14px">    <a href="https://github.com/fgouget/spice-common/tree/gst" target="_blank">https://github.com/fgouget/spice-common/tree/gst</a></div><div style="font-size:14px">    <a href="https://github.com/fgouget/spice-protocol/tree/gst" target="_blank">https://github.com/fgouget/spice-protocol/tree/gst</a></div><div style="font-size:14px">- hardcoding to change the codec from mjpeg to vp8 or h264</div><div style="font-size:14px">    spice-gst/server/red_worker.c</div><div style="font-size:14px">        dcc_create_video_encoder()</div><div style="font-size:14px">            << return mjpeg_encoder_new(SPICE_VIDEO_CODEC_TYPE_MJPEG, ...)</div><div style="font-size:14px">            >> return gstreamer_encoder_new(SPICE_VIDEO_CODEC_TYPE_H264, ...)</div><div style="font-size:14px">- whenever trying to play a video, remote viewer doesn't respond, and VM gets hung. Below is the gstack output of qemu-kvm process which was captured after I'd closed remote viewer.</div><div style="font-size:14px"><br></div><div style="font-size:14px">Thread 19 (Thread 0x7f0311065700 (LWP 15778)):</div><div style="font-size:14px">#0  0x00007f0320083f7d in __lll_lock_wait () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f032007fd32 in _L_lock_791 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#2  0x00007f032007fc38 in pthread_mutex_lock () from /lib64/libpthread.so.0</div><div style="font-size:14px">#3  0x00007f0322b3a3a9 in qemu_mutex_lock ()</div><div style="font-size:14px">#4  0x00007f0322a82634 in kvm_cpu_exec ()</div><div style="font-size:14px">#5  0x00007f0322a356f5 in qemu_kvm_cpu_thread_fn ()</div><div style="font-size:14px">#6  0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#7  0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">Thread 18 (Thread 0x7f030bfff700 (LWP 15793)):</div><div style="font-size:14px">#0  0x00007f0320081705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f0321320c57 in g_cond_wait () from /lib64/libglib-2.0.so.0</div><div style="font-size:14px">#2  0x00007f0316e7b8b7 in gst_app_sink_pull_sample (appsink=0x7f02b838cbc0) at gstappsink.c:1219</div><div style="font-size:14px">#3  0x00007f031ce0347d in pull_compressed_buffer () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#4  0x00007f031ce03944 in spice_gst_encoder_encode_frame () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#5  0x00007f031cdca828 in red_marshall_stream_data () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#6  0x00007f031cdcab8b in marshall_qxl_drawable () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#7  0x00007f031cdcc442 in display_channel_send_item () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#8  0x00007f031cd9f7e6 in red_channel_client_send_item () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#9  0x00007f031cda1f69 in red_channel_client_push () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#10 0x00007f031cda201e in red_channel_push () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#11 0x00007f031cdcc6ff in red_push () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#12 0x00007f031cdd3ed9 in red_worker_main () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#13 0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#14 0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">Thread 17 (Thread 0x7f030923b700 (LWP 15899)):</div><div style="font-size:14px">#0  0x00007f0320081705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f0321320c57 in g_cond_wait () from /lib64/libglib-2.0.so.0</div><div style="font-size:14px">#2  0x00007f0316e77f6d in gst_app_src_create (bsrc=0x7f02b829f900, offset=<optimized out>, size=4096, buf=0x7f030923a9a0) at gstappsrc.c:1197</div><div style="font-size:14px">#3  0x00007f0316c432f5 in gst_base_src_get_range (src=src@entry=0x7f02b829f900, offset=offset@entry=641048, length=length@entry=4096, buf=buf@entry=0x7f030923aaa8) at gstbasesrc.c:2455</div><div style="font-size:14px">#4  0x00007f0316c44e43 in gst_base_src_loop (pad=0x7f02b838a060) at gstbasesrc.c:2731</div><div style="font-size:14px">#5  0x00007f0316997081 in gst_task_func (task=0x7f02b8395050) at gsttask.c:331</div><div style="font-size:14px">#6  0x00007f032130403c in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0</div><div style="font-size:14px">#7  0x00007f03213036b5 in g_thread_proxy () from /lib64/libglib-2.0.so.0</div><div style="font-size:14px">#8  0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#9  0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">Thread 16 (Thread 0x7f0308a3a700 (LWP 15900)):</div><div style="font-size:14px">#0  0x00007f0320081705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f03099154db in x264_threadpool_thread () from /usr/local/lib/gstreamer-1.0/libgstx264.so</div><div style="font-size:14px">#2  0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#3  0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">... ...</div><div style="font-size:14px">Thread 3 (Thread 0x7f02ad7fa700 (LWP 15913)):</div><div style="font-size:14px">#0  0x00007f0320081705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f03099154db in x264_threadpool_thread () from /usr/local/lib/gstreamer-1.0/libgstx264.so</div><div style="font-size:14px">#2  0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#3  0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">Thread 2 (Thread 0x7f02a9c32700 (LWP 15914)):</div><div style="font-size:14px">#0  0x00007f0320081705 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f0309914bd5 in x264_lookahead_thread () from /usr/local/lib/gstreamer-1.0/libgstx264.so</div><div style="font-size:14px">#2  0x00007f032007ddf5 in start_thread () from /lib64/libpthread.so.0</div><div style="font-size:14px">#3  0x00007f031c0e91ad in clone () from /lib64/libc.so.6</div><div style="font-size:14px">Thread 1 (Thread 0x7f032282fa40 (LWP 15767)):</div><div style="font-size:14px">#0  0x00007f032008425d in read () from /lib64/libpthread.so.0</div><div style="font-size:14px">#1  0x00007f031cda597a in read_safe () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#2  0x00007f031cda5f0e in dispatcher_send_message () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#3  0x00007f031cda6d5f in red_dispatcher_disconnect_cursor_peer () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#4  0x00007f031cda4b9d in red_client_destroy () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#5  0x00007f031cdd8972 in reds_client_disconnect () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#6  0x00007f031cda9aba in main_dispatcher_handle_client_disconnect () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#7  0x00007f031cda5c68 in dispatcher_handle_single_read () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#8  0x00007f031cda5d67 in dispatcher_handle_recv_read () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#9  0x00007f031cda9cdc in dispatcher_handle_read () from /lib64/libspice-server.so.1</div><div style="font-size:14px">#10 0x00007f03229c4206 in qemu_iohandler_poll ()</div><div style="font-size:14px">#11 0x00007f03229c8768 in main_loop_wait ()</div><div style="font-size:14px">#12 0x00007f03228ec340 in main ()</div></div>