Opened 8 weeks ago

Last modified 3 weeks ago

#59750 assigned defect

ffmpeg and ffmpeg-devel immediately crash with segfault 11 when input is mp4

Reported by: fdik (Volker Birk) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: ffmpeg

Description (last modified by mf2k (Frank Schima))

Sample (crashes with all .mp4):

ffmpeg version 4.2.git Copyright (c) 2000-2019 the FFmpeg developers
  built with clang version 9.0.0 (tags/RELEASE_900/final)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/clang-mp-9.0 --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.101 / 58. 59.101
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 61.100 /  7. 61.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'BlackRock_Vortrag.mp4':
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2019-11-17T17:57:34.000000Z
  Duration: 01:14:37.25, start: 0.000000, bitrate: 6159 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 5998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
      creation_time   : 2019-11-17T17:57:34.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 157 kb/s (default)
      creation_time   : 2019-11-17T17:57:34.000000Z
      handler_name    : #Mainconcept MP4 Sound Media Handler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[1]    29329 segmentation fault  ffmpeg -i BlackRock_Vortrag.mp4 BlackRock_Vortrag-x.mp4

Change History (6)

comment:1 Changed 8 weeks ago by fdik (Volker Birk)

I tried different compile options +nonfree etc., but I cannot find a combination where it does not crash.

comment:2 Changed 8 weeks ago by mf2k (Frank Schima)

In the future, please use WikiFormatting.

comment:3 Changed 8 weeks ago by mf2k (Frank Schima)

Cc: dbevans removed
Description: modified (diff)
Keywords: ffmpeg segfault mp4 removed
Owner: set to dbevans
Status: newassigned

comment:4 Changed 3 weeks ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

I cannot reproduce this problem.
I tried a few different mp4 files, and ffmpeg -i XXX.mp4 out.mp4 works.

This is just a guess, but perhaps FFmpeg suffers from the -fno-stack-check bug.
The bug seems to have been fixed in Xcode 11.3.
After upgrading to the latest Xcode and Command Line Tools, I suggest you try to rebuild ffmpeg from source to see what happens.

comment:5 Changed 3 weeks ago by ryandesign (Ryan Schmidt)

Also, please attach the crash log; it may tell us why it crashed.

comment:6 Changed 3 weeks ago by rubendibattista (Ruben Di Battista)

In ab2056ca1b07d1dbc159473994516909a33b451a/macports-ports (master):

x264: Update snapshot

This fixes a segmentation fault on Catalina
See: #59750

Note: See TracTickets for help on using tickets.