GNOME Bugzilla – Bug 703922
The mpegpsmux plugins crashed sometimes
Last modified: 2013-07-15 10:59:28 UTC
Created attachment 248803 [details] [review] the attachment fixed the bugs and stability run over one week. title: mpegpsmux crashed sometimes reproduce step: run the commands for h264/ps/rtp streaming test: gst-launch-0.10 artpecsrc bitrate=128 text="AXIS Tesing Videos:" textsize=0 textcolor=black textbgcolor=transparent ! video/x-h264,width=320,height=240,framerate=15/2 ! cachesink async=false cachesrc ! mpegpsmux ! rtpmp2pspay pt=96 ssrc=0x12345678 ! udpsink host=192.168.77.248 port=11118 (Actually, in order to debug conveniently, I run another test program "streambin" which run the same commands by gst_parse_launch function). bug description: 1. when run mpegpsmux plugins for real-time streaming, it might cause a crash sometimes. 2. the crash bug reproduce in all mpegpsmux version. 3. when crashed, core dump backtrace as following (sometimes):
+ Trace 232213
4. when crashed, program throw exception: *** glibc detected *** ./streambin: free(): invalid next size (normal): 0x7540b4a0 *** 5. the core backtrace usual output different function call stack. root cause: 1. one memory buffer visit out of range. 2. when mpegpsmux initial memory buffer to store PS header, it set an improper size. 3. so if the PS header length bigger than the initial buffer, would cause a crash due to visit undefined memory address. solution: 1. modify the initial memory buffer to enough size to store PS header. one optional solution like this attachment source code:
This doesn't seem to be a problem anymore with 1.0 and latest git. Can you confirm?
Comment on attachment 248803 [details] [review] the attachment fixed the bugs and stability run over one week. The patch is against an old version and does not apply to 1.0 or latest git anymore.
OK. Thanks! I have double checked it. the bug had fixed in 1.0.5. thanks!