Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 552224

Summary: media-video/motion-3.2.12-r3 stable request
Product: Gentoo Linux Reporter: Marcin Jurkowski <marcin1j>
Component: [OLD] Keywording and StabilizationAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal Keywords: STABLEREQ
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: Was: media-video/motion-3.2.12-r2 segfault with ffmpeg 2.2+
Package list:
Runtime testing required: ---
Attachments: emerge --info for media-video/motion
emerge --info for media-video/ffmpeg
Fixed ebuild

Description Marcin Jurkowski 2015-06-15 19:27:44 UTC
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.
Comment 1 Marcin Jurkowski 2015-06-15 19:30:03 UTC
Created attachment 405198 [details]
emerge --info for media-video/motion

The content of emerge --info media-video/motion
Comment 2 Marcin Jurkowski 2015-06-15 19:31:11 UTC
Created attachment 405200 [details]
emerge --info for media-video/ffmpeg

emerge --info for media-video/ffmpeg
Comment 3 Marcin Jurkowski 2015-06-15 19:37:10 UTC
Created attachment 405202 [details]
Fixed ebuild

I've attached a fixed ebuild, using autotools eclass
Comment 4 Pacho Ramos gentoo-dev 2015-06-24 20:09:39 UTC
+*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.
+
Comment 5 Agostino Sarubbo gentoo-dev 2015-06-26 14:30:11 UTC
amd64 stable
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2015-06-28 11:43:37 UTC
x86 stable