Opened 6 years ago

Closed 6 years ago

#6846 closed defect (fixed)

Segmentation fault when opening a specific m3u8 stream

Reported by: Kyle Owned by:
Priority: important Component: avformat
Version: git-master Keywords: hls crash SIGSEGV regression mpv
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


Summary of the bug:
I get a segmentaton fault when I try to play the HLS stream for aragon tv

How to reproduce:
Try to open this URL in ffmpeg or ffplay

ffmpeg -i
ffmpeg version N-89124-c9cd990dcc8 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.2.0-8ubuntu3)
  configuration: --prefix=/home/kyle --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-postproc --enable-libx264 --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libmp3lame --enable-libtheora --enable-libopenjpeg --enable-libvpx --enable-libgsm --enable-libspeex --enable-libvorbis --enable-libxvid --cpu=broadwell --enable-libxavs --enable-libfreetype --enable-libvo-amrwbenc --enable-libcelt --enable-openal --enable-libcdio --enable-libmodplug --enable-libpulse --enable-libv4l2 --enable-libass --enable-libbluray --enable-libiec61883 --enable-libopus --enable-libcaca --enable-libfdk-aac --enable-libilbc --enable-libtwolame --enable-librtmp --enable-libsoxr --enable-libflite --enable-libgme --enable-libzvbi --enable-libssh --enable-libwavpack --enable-ladspa --enable-fontconfig --enable-libzmq --enable-libshine --enable-opengl --enable-libx265 --disable-ffserver --disable-doc --enable-avresample --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-shared --disable-ffprobe --enable-libsmbclient --enable-libwebp --enable-libbs2b --enable-libfribidi --enable-libsnappy --enable-gcrypt --enable-gmp --enable-gnutls --enable-opencl --enable-librubberband --enable-libtesseract --enable-debug --enable-libopenmpt --enable-librsvg --enable-libmysofa --disable-stripping
  libavutil      56.  0.100 / 56.  0.100
  libavcodec     58.  3.103 / 58.  3.103
  libavformat    58.  2.100 / 58.  2.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  2.100 /  7.  2.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Segmentation fault (core dumped)

Here's the backtrace when I run it with gdb

Program received signal SIGSEGV, Segmentation fault.
ffurl_get_short_seek (h=0x0) at libavformat/avio.c:650
650	    if (!h->prot->url_get_short_seek)
(gdb) bt
#0  0x000055555589d8f0 in ffurl_get_short_seek (h=0x0)
    at libavformat/avio.c:650
#1  0x000055555589f0a8 in avio_seek (s=s@entry=0x55555756b960, offset=offset@entry=0, whence=<optimized out>, whence@entry=0) at libavformat/aviobuf.c:275
#2  0x00005555558d9ac5 in id3v2_read_internal (pb=0x55555756b960, metadata=0x55555755f780, s=s@entry=0x0, magic=magic@entry=0x555556426ebb "ID3", extra_meta=0x7fffffffcec8, 
    extra_meta@entry=0x7fffffffce28, max_search_size=max_search_size@entry=0)
    at libavformat/id3v2.c:1100
#3  0x00005555558d9f80 in id3v2_read_internal (max_search_size=0, extra_meta=0x7fffffffce28, magic=magic@entry=0x555556426ebb "ID3", s=0x0, metadata=<optimized out>, pb=<optimized out>) at libavformat/id3v2.c:1111
#4  0x00005555558d9f80 in ff_id3v2_read_dict (pb=<optimized out>, metadata=<optimized out>, magic=magic@entry=0x555556426ebb "ID3", extra_meta=extra_meta@entry=0x7fffffffcec8) at libavformat/id3v2.c:1112
#5  0x00005555559bb5e6 in avformat_open_input (ps=ps@entry=0x7fffffffcf88, filename=filename@entry=0x7fffffffe1fc "", fmt=fmt@entry=0x0, options=0x55555755ef88)
    at libavformat/utils.c:596
#6  0x00005555556e5206 in open_input_file (o=o@entry=0x7fffffffd140, filename=<optimized out>) at fftools/ffmpeg_opt.c:1071
#7  0x00005555556e6b24 in open_files (l=0x55555755eeb8, l=0x55555755eeb8, open_file=0x5555556e3780 <open_input_file>, inout=0x55555644d5c1 "input")
    at fftools/ffmpeg_opt.c:3296
#8  0x00005555556e6b24 in ffmpeg_parse_options (argc=<optimized out>, argv=<optimized out>) at fftools/ffmpeg_opt.c:3336
#9  0x00005555556dc7ad in main (argc=3, argv=0x7fffffffde38)
    at fftools/ffmpeg.c:4775

Change History (6)

comment:1 by Steven Liu, 6 years ago

comment:2 by Steven Liu, 6 years ago

comment:3 by Carl Eugen Hoyos, 6 years ago

Keywords: hls crash SIGSEGV regression added
Priority: normalimportant
Reproduced by developer: set

comment:4 by Kyle, 6 years ago

Is that patch still valid? The replies mentioned some issues with it.

in reply to:  3 comment:5 by Carl Eugen Hoyos, 6 years ago

Keywords: mpv added

Replying to cehoyos:

Regression since 858db4b01fa2b55ee55056c033054ca54ac9b0fd
As suggested there, the regression is also reproducible when seeking in twitch streams with FFplay.

comment:6 by Aman, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.