GNOME Bugzilla – Bug 629047
segfault in seek matroskademux
Last modified: 2018-07-24 08:44:00 UTC
while we try to test the currently added seek support in matroskademux we found that while we create a new file with: ------------------------------------------- gst-launch rtspsrc location="rtsp://admin:12345@10.30.0.106:554/h.264/ch1/main" latency=1000 ! rtph264depay access-unit=true ! h264parse ! matroskamux streamable=true ! filesink location="test.mkv" ------------------------------------------- stop the recording with ctrl-c (and gst-launch has no -e option), the read it with ------------------------------------------- gst-launch filesrc location="test.mkv" ! matroskademux ! h264parse ! ffdec_h264 ! navseek ! xvimagesink ------------------------------------------- when you push left or right button (ie. try to seek) it crash with seg. fault.
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a description of how to reproduce this bug. You'll also need to add a stack trace; please see http://live.gnome.org/GettingTraces for more information about how to do so. Thanks in advance!
Hi, I attach a file recorded with matroskamux streamable=true, try to seek that. Using this pipeline it goes to segfault: gst-launch filesrc location="test_streamable.mkv" ! matroskademux ! h264parse ! ffdec_h264 ! navseek ! xvimagesink Caught SIGSEGV accessing address 0x14
+ Trace 223596
Regards, Tibor
Created attachment 169768 [details] streamable matroska file
Created attachment 169770 [details] [review] Unref buffer when not needed anymore I can reproduce it: [Cambiando a Thread 0xb7e41b70 (LWP 22644)] 0x006baffc in gst_matroska_demux_search_pos (demux=<value optimized out>, pad=<value optimized out>, event=0x82a82c8) at matroska-demux.c:2397 2397 cluster_pos = gst_byte_reader_masked_scan_uint32 (&reader, 0xffffffff, (gdb) bt
+ Trace 223597
buf is unreffed after 'if(cluster_pos >=0)' but then, you can go back to resume, which will use GST_BUFFER_SIZE(buf). I have tried the following patch but then it triggers 'g_assert(id==GST_MATROSKA_ID_CLUSTER)'
BTW, the patch is just a quick hack to point the issue.
commit bb9a8a9b7d78e6bf8aa848ea40080999f0daf0d4 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Oct 5 16:01:19 2010 +0200 matroskademux: only unref buffer when no longer needed for cluster scanning Fixes #629047.
*** Bug 634445 has been marked as a duplicate of this bug. ***