Motion compiled with ffmpeg 2.2 or newer segfaults as it tries to write a new avi file. The segfault actually occurs in init_muxer() libavformat function and it's caused by improperly initialized AVFormatContext structure, using av_mallocz() instead of avformat_alloc_context(). The reason for this bug is that gentoo-specific patches (ffmpeg-2.patch, ffmpeg-3.patch, ffmpeg-4.patch), meant to support wide range of ffmpeg versions, introduced #ifdefs in the code and suitable check in configure.in, however the build still uses the old, upstream configure script. In short, configure script must be regenerated after patching upstream sources. Reproducible: Always Steps to Reproduce: 1. Compile motion with ffmpeg 2.2 or 2.6 2. Start motion service 3. Wait till it detects and start recording a motion sequence Actual Results: The motion process immediately crashes, leaving empty (zero-byte) avi file.
Created attachment 405198 [details] emerge --info for media-video/motion The content of emerge --info media-video/motion
Created attachment 405200 [details] emerge --info for media-video/ffmpeg emerge --info for media-video/ffmpeg
Created attachment 405202 [details] Fixed ebuild I've attached a fixed ebuild, using autotools eclass
+*motion-3.2.12-r3 (24 Jun 2015) + + 24 Jun 2015; Pacho Ramos <pacho@gentoo.org> +motion-3.2.12-r3.ebuild: + Use new ffmpeg/libav USEs style, autoreconf is needed after applying the + patches (#552224 by Marcin Jurkowski), use readme.gentoo.eclass. +
amd64 stable
x86 stable