Solved multimedia/ffmpeg known segmentation fault

Good day!

I have a ffserver instance for rtsp broadcasting. And after ney year port upgrades, ffserver segfaults on client rtsp connection.
I'm google about that issue, and it already known: https://trac.ffmpeg.org/ticket/5869
Is it possible to fix version in ports please?

uname -a
Code:
FreeBSD BSD-MAIN 11.0-STABLE FreeBSD 11.0-STABLE #3 r312188: Sun Jan 15 14:54:19 +03 2017     user@BSD-MAIN:/usr/obj/usr/src/sys/BSDSERV  amd64
pkg info | grep ffmpeg
Code:
ffmpeg-3.2.2_4,1               Realtime audio/video encoder/converter and streaming server
/var/db/ports/multimedia_ffmpeg/options
Code:
# This file is auto-generated by 'make config'.
# Options for ffmpeg-3.2.2_4,1
_OPTIONS_READ=ffmpeg-3.2.2_4,1
_FILE_COMPLETE_OPTIONS_LIST=ALSA AMR_NB AMR_WB ASS BS2B CACA CDIO CELT CHROMAPRINT DC1394 DEBUG DOCS EBUR128 FDK_AAC FFSERVER FLITE FONTCONFIG FREETYPE FREI0R FRIBIDI GME GSM ICONV ILBC JACK KVAZAAR LADSPA LAME LIBBLURAY MMX MODPLUG NETCDF OPENAL OPENCL OPENCV OPENGL OPENH264 OPENJPEG OPTIMIZED_CFLAGS OPUS PULSEAUDIO RTCPU RUBBERBAND SCHROEDINGER SDL SMB SNAPPY SNDIO SOXR SPEEX SSE SSH TESSERACT THEORA TWOLAME V4L VAAPI VDPAU VIDSTAB VORBIS VO_AMRWBENC VPX WAVPACK WEBP X11GRAB X264 X265 XCB XVID XVIDEO ZIMG ZMQ ZVBI GCRYPT GMP LIBRTMP GNUTLS OPENSSL GPL3 NONFREE
OPTIONS_FILE_UNSET+=ALSA
OPTIONS_FILE_UNSET+=AMR_NB
OPTIONS_FILE_UNSET+=AMR_WB
OPTIONS_FILE_UNSET+=ASS
OPTIONS_FILE_UNSET+=BS2B
OPTIONS_FILE_UNSET+=CACA
OPTIONS_FILE_UNSET+=CDIO
OPTIONS_FILE_UNSET+=CELT
OPTIONS_FILE_UNSET+=CHROMAPRINT
OPTIONS_FILE_UNSET+=DC1394
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=DOCS
OPTIONS_FILE_UNSET+=EBUR128
OPTIONS_FILE_UNSET+=FDK_AAC
OPTIONS_FILE_SET+=FFSERVER
OPTIONS_FILE_UNSET+=FLITE
OPTIONS_FILE_UNSET+=FONTCONFIG
OPTIONS_FILE_UNSET+=FREETYPE
OPTIONS_FILE_SET+=FREI0R
OPTIONS_FILE_UNSET+=FRIBIDI
OPTIONS_FILE_UNSET+=GME
OPTIONS_FILE_UNSET+=GSM
OPTIONS_FILE_SET+=ICONV
OPTIONS_FILE_UNSET+=ILBC
OPTIONS_FILE_UNSET+=JACK
OPTIONS_FILE_UNSET+=KVAZAAR
OPTIONS_FILE_UNSET+=LADSPA
OPTIONS_FILE_UNSET+=LAME
OPTIONS_FILE_UNSET+=LIBBLURAY
OPTIONS_FILE_UNSET+=MMX
OPTIONS_FILE_UNSET+=MODPLUG
OPTIONS_FILE_UNSET+=NETCDF
OPTIONS_FILE_UNSET+=OPENAL
OPTIONS_FILE_UNSET+=OPENCL
OPTIONS_FILE_UNSET+=OPENCV
OPTIONS_FILE_UNSET+=OPENGL
OPTIONS_FILE_UNSET+=OPENH264
OPTIONS_FILE_SET+=OPENJPEG
OPTIONS_FILE_UNSET+=OPTIMIZED_CFLAGS
OPTIONS_FILE_UNSET+=OPUS
OPTIONS_FILE_UNSET+=PULSEAUDIO
OPTIONS_FILE_UNSET+=RTCPU
OPTIONS_FILE_UNSET+=RUBBERBAND
OPTIONS_FILE_UNSET+=SCHROEDINGER
OPTIONS_FILE_UNSET+=SDL
OPTIONS_FILE_UNSET+=SMB
OPTIONS_FILE_UNSET+=SNAPPY
OPTIONS_FILE_UNSET+=SNDIO
OPTIONS_FILE_UNSET+=SOXR
OPTIONS_FILE_UNSET+=SPEEX
OPTIONS_FILE_SET+=SSE
OPTIONS_FILE_UNSET+=SSH
OPTIONS_FILE_UNSET+=TESSERACT
OPTIONS_FILE_SET+=THEORA
OPTIONS_FILE_UNSET+=TWOLAME
OPTIONS_FILE_UNSET+=V4L
OPTIONS_FILE_UNSET+=VAAPI
OPTIONS_FILE_UNSET+=VDPAU
OPTIONS_FILE_UNSET+=VIDSTAB
OPTIONS_FILE_UNSET+=VORBIS
OPTIONS_FILE_UNSET+=VO_AMRWBENC
OPTIONS_FILE_UNSET+=VPX
OPTIONS_FILE_UNSET+=WAVPACK
OPTIONS_FILE_UNSET+=WEBP
OPTIONS_FILE_UNSET+=X11GRAB
OPTIONS_FILE_SET+=X264
OPTIONS_FILE_SET+=X265
OPTIONS_FILE_UNSET+=XCB
OPTIONS_FILE_UNSET+=XVID
OPTIONS_FILE_UNSET+=XVIDEO
OPTIONS_FILE_UNSET+=ZIMG
OPTIONS_FILE_UNSET+=ZMQ
OPTIONS_FILE_UNSET+=ZVBI
OPTIONS_FILE_UNSET+=GCRYPT
OPTIONS_FILE_SET+=GMP
OPTIONS_FILE_UNSET+=LIBRTMP
OPTIONS_FILE_SET+=GNUTLS
OPTIONS_FILE_UNSET+=OPENSSL
OPTIONS_FILE_SET+=GPL3
OPTIONS_FILE_SET+=NONFREE
ffserv.conf
Code:
RTSPPort        8554
HTTPPort        8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections      200
MaxClients      100
MaxBandwidth    500000

<Feed feed1.ffm>
File    /tmp/feed1.ffm
</Feed>

<Feed feed2.ffm>
File    /tmp/feed2.ffm
</Feed>

<Feed feed3.ffm>
File    /tmp/feed3.ffm
</Feed>

<Stream cam1.avi>
Format rtp
Feed    feed1.ffm
VideoSize       1920x1080
VideoBufferSize 5000
NoAudio
</Stream>

<Stream cam2.avi>
Format rtp
Feed    feed2.ffm
VideoSize       1920x1080
VideoBufferSize 5000
NoAudio
</Stream>

<Stream cam3.avi>
Format rtp
Feed    feed3.ffm
VideoSize       704x480
VideoBufferSize 2000
NoAudio
</Stream>

<Stream stat.html>
Format status
</Stream>
 
Thanks! I do a PR and that patch helps me. One moment I want to ask:
I'm create a patch file
/usr/ports/multimedia/ffmpeg/files/patch-ffserver_config.c
Code:
--- a/ffserver_config.c.orig
+++ b/ffserver_config.c
@@ -320,6 +320,8 @@ done:
     av_dict_free(&recommended);
     st->recommended_encoder_configuration = enc_config;
     st->codec = av;
+    st->codecpar = avcodec_parameters_alloc();
+    avcodec_parameters_from_context(st->codecpar, av);
     stream->streams[stream->nb_streams++] = st;
 }
But on make patch it ask me which file to patch, I'm tell him ffserver_config.c and it works, but why it ask? I'm do patch file similar as other patches...
 
When creating names for patch files, replace each underscore (_) with two underscores (__) and each slash (/) with one underscore (_). For example, to patch a file named src/freeglut_joystick.c, name the corresponding patch patch-src_freeglut__joystick.c. Do not name patches like patch-aa or patch-ab. Always use the path and file name in patch names. Using make makepatch automatically generates the correct names.

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html
 
Back
Top