Skip to content

libavi: fix hang with zerosized strd chunks

Kakadus requested to merge Kakadus/vlc:libavi-fix-serosized into master

The fourcc and length bytes needs to be skipped on empty strd chunks, otherwise the stream is not advanced, resulting in a hang.

hang1.avi

Click to expand to see logs

[0000631c078a27b0] main libvlc debug: VLC media player - 4.0.0-dev Otto Chriek

[0000631c078a27b0] main libvlc debug: Copyright © 1996-2024 the VideoLAN team

[0000631c078a27b0] main libvlc debug: revision 4.0.0-dev-27431-gc08d8d3f

[0000631c078a27b0] main libvlc debug: configured with ./configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--with-kde-solid=/usr/share/solid/actions/' '--disable-rpath' '--enable-nls' '--enable-archive' '--enable-live555' '--enable-dc1394' '--enable-dv1394' '--enable-dvdread' '--enable-dvdnav' '--enable-bluray' '--disable-opencv' '--enable-smbclient' '--enable-sftp' '--enable-nfs' '--enable-dvbpsi' '--enable-gme' '--enable-ogg' '--enable-shout' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mad' '--enable-mpg123' '--enable-gst-decode' '--enable-avcodec' '--enable-libva' '--enable-avformat' '--enable-postproc' '--enable-faad' '--enable-vpx' '--enable-twolame' '--disable-fdkaac' '--enable-a52' '--enable-dca' '--enable-flac' '--enable-libmpeg2' '--enable-vorbis' '--enable-speex' '--enable-opus' '--enable-oggspots' '--disable-schroedinger' '--enable-png' '--enable-jpeg' '--enable-x264' '--enable-x265' '--enable-zvbi' '--enable-libass' '--enable-kate' '--enable-tiger' '--enable-vdpau' '--enable-wayland' '--enable-freetype' '--enable-fribidi' '--enable-harfbuzz' '--enable-fontconfig' '--enable-svg' '--enable-svgdec' '--enable-caca' '--enable-pulse' '--enable-alsa' '--enable-jack' '--enable-samplerate' '--enable-soxr' '--disable-chromaprint' '--disable-chromecast' '--enable-qt' '--enable-skins2' '--enable-ncurses' '--enable-lirc' '--enable-goom' '--enable-projectm' '--enable-avahi' '--enable-mtp' '--enable-upnp' '--enable-microdns' '--enable-libxml2' '--disable-libgcrypt' '--enable-gnutls' '--enable-taglib' '--enable-secret' '--enable-kwallet' '--disable-update-check' '--enable-notify' '--enable-libplacebo' '--enable-vlc' '--enable-aribsub' '--enable-aom' '--enable-srt' '--enable-dav1d' '--disable-decklink' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -I/usr/include/samba-4.0 -ffat-lto-objects' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' 'CPPFLAGS= -I/usr/include/samba-4.0' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -std=c++11' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig/:' 'LUA_LIBS=-llua5.2 -lm' 'LUAC=/usr/bin/luac5.2' 'MPG123_CFLAGS= -DMPG123_NO_LARGENAME'

[0000631c078a27b0] main libvlc debug: searching plug-in modules

[0000631c078a27b0] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat

[0000631c078a27b0] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins'

[0000631c078a27b0] main libvlc debug: plug-ins loaded: 590 modules

[0000631c078a27b0] main libvlc debug: opening config file (~/.config/vlc/vlcrc)

[00007ffd01da3f68] main generic debug: looking for logger module matching "any": 4 candidates

[00007ffd01da3f68] main generic debug: using logger module "console"

[00007ffd01da3f68] main generic debug: looking for tracer module matching "none": 0 candidates

[00007ffd01da3f68] main generic debug: no tracer modules matched with name none

[0000631c078a27b0] main libvlc debug: translation test: code is "C"

[00007ffd01da3f28] main generic debug: looking for keystore module matching "memory": 1 candidates

[00007ffd01da3f28] main generic debug: using keystore module "memory"

[0000631c078a27b0] main libvlc debug: CPU has capabilities SSE2 SSE3 SSSE3 SSE4.1 AVX AVX2 FPU

[00007ffd01da3f38] main generic debug: looking for medialibrary module matching "any": 0 candidates

[00007ffd01da3f38] main generic debug: no medialibrary modules matched with name any

[0000631c078a27b0] main libvlc warning: Media library initialization failed

[0000631c07931f90] main player debug: creating audio output

[00007ffd01da3c88] main generic debug: looking for audio output module matching "any": 4 candidates

[0000631c07935bf0] vlcpulse audio output debug: using library version 17.0.0

[0000631c07935bf0] vlcpulse audio output debug: (compiled with version 17.0.0, protocol 35)

[0000631c07935bf0] vlcpulse audio output debug: connected locally to /run/user/1000/pulse/native as client #650 (closed)

[0000631c07935bf0] vlcpulse audio output debug: using protocol 35, server protocol 35

[0000631c07935bf0] pulse audio output debug: server PulseAudio (on PipeWire 1.0.1) version 15.0.0 on jonas@ArchLaptop

[0000631c07935bf0] pulse audio output debug: adding sink 53: alsa_output.pci-0000_00_1f.3.analog-stereo (Built-in Audio Analog Stereo)

[00007ffd01da3c88] main generic debug: using audio output module "pulse"

[0000631c07931f90] main player debug: keeping audio output

[00007ffd01da3e28] main generic debug: looking for interface module matching "dbus,none": 1 candidates

[0000631c07954090] dbus interface debug: listening on dbus as: org.mpris.MediaPlayer2.vlc

[00007ffd01da3e28] main generic debug: using interface module "dbus"

[00007e7614000ba0] main input debug: Creating an input for preparsing 'id:000001,src:000012,time:154407,execs:276160,op:int16,pos:167,val:+100'

[00007ffd01da3fc8] main generic debug: looking for interface module matching "hotkeys": 1 candidates

[00007ffd01da3fc8] main generic debug: using interface module "hotkeys"

[00007ffd01da3fc8] main generic debug: looking for interface module matching "xcb_hotkeys": 1 candidates

[00007ffd01da3fc8] main generic debug: using interface module "xcb_hotkeys"

[0000631c078a27b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

[00007ffd01da3fc8] main generic debug: looking for interface module matching "any": 4 candidates

[00007e7618f34ad8] [qt] main generic debug: looking for qtwayland module matching "any": 1 candidates

[00007e7618f34ad8] [qt] main generic debug: using qtwayland module "qt_wayland"

[00007ffd01da3fc8] main generic debug: using interface module "qt"

[0000631c0799b500] main input debug: Creating an input for 'id:000001,src:000012,time:154407,execs:276160,op:int16,pos:167,val:+100'

[0000631c0799ab80] [qt] qt generic debug: on_player_current_media_changed

[0000631c0799ab80] [qt] qt generic debug: on_player_state_changed

[0000631c0799ab80] [qt] qt generic debug: on_player_buffering

[0000631c0799b500] main input debug: using timeshift granularity of 50 MiB

[0000631c0799b500] main input debug: using default timeshift path

[0000631c0799b500] main input debug: file://~/...../hang1.avi' gives access file' demux any' path ~/...../hang1.avi'

[00007e759c001000] main access debug: creating access: file://~/...../hang1.avi

[00007e759c001000] main access debug: (path: ~/...../hang1.avi)

[00007e760bf44818] main generic debug: looking for access module matching "file": 4 candidates

[00007e760bf44818] main generic debug: using access module "filesystem"

[00007e760bf44858] main generic debug: looking for stream_filter module matching "prefetch,cache": 2 candidates

[00007e759c001930] cache_read stream filter debug: Using stream method for AStream*

[00007e759c001930] cache_read stream filter debug: starting pre-buffering

[00007e759c001930] cache_read stream filter debug: received first data after 0 ms

[00007e759c001930] cache_read stream filter debug: pre-buffering done 1024 bytes in 0s - 52631 KiB/s

[00007e760bf44858] main generic debug: using stream_filter module "cache_read"

[00007e760bf44868] main generic debug: looking for stream_filter module matching "any": 8 candidates

[00007e760bf44868] main generic debug: no stream_filter modules matched with name any

[00007e760bf44878] main generic debug: looking for stream_directory module matching "any": 1 candidates

[00007e760bf44878] main generic debug: no stream_directory modules matched with name any

[0000631c0799b500] main input debug: attachment of directory-extractor failed for file://~/...../hang1.avi

[00007e760bf44858] main generic debug: looking for stream_filter module matching "record": 1 candidates

[00007e760bf44858] main generic debug: using stream_filter module "record"

[0000631c0799b500] main input debug: creating demux "any", URL: file://~/...../hang1.avi, path: ~/...../hang1.avi

[00007e760bf44878] main generic debug: looking for demux module matching "any": 64 candidates

[00007e759c002410] avi stream filter debug: found chunk, fourcc: RIFF size:2622 pos:0

[00007e759c002410] avi stream filter debug: found LIST chunk: 'AVI '

[00007e759c002410] avi stream filter debug: <list 'AVI '>

[00007e759c002410] avi stream filter debug: found chunk, fourcc: LIST size:220 pos:12

[00007e759c002410] avi stream filter debug: found LIST chunk: 'hdrl'

[00007e759c002410] avi stream filter debug: <list 'hdrl'>

[00007e759c002410] avi stream filter debug: found chunk, fourcc: avih size:56 pos:24

[00007e759c002410] avi stream filter debug: avih: streams:1 flags: HAS_INDEX TRUST_CKTYPE 352x288

[00007e759c002410] avi stream filter debug: found chunk, fourcc: LIST size:144 pos:88

[00007e759c002410] avi stream filter debug: found LIST chunk: 'strl'

[00007e759c002410] avi stream filter debug: <list 'strl'>

[00007e759c002410] avi stream filter debug: found chunk, fourcc: strh size:56 pos:100

[00007e759c002410] avi stream filter debug: strh: type:vids handler:0x20424944 samplesize:0 25.00fps

[00007e759c002410] avi stream filter debug: found chunk, fourcc: strd size:0 pos:164

[00007e759c002410] avi stream filter debug: Zero sized pre-JUNK section met

[00007e759c002410] avi stream filter debug: free chunk strd

Merge request reports

Loading