Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

muxer: fix nil deref when finalizing muxerSegmentFMP4 with no currentPart #136

Closed
wants to merge 1 commit into from

Commits on Jan 24, 2024

  1. muxer: fix nil deref when finalizing muxerSegmentFMP4 with no current…

    …Part
    
    Playing an AV1 + AAC HLS stream published by OBS Studio via RTMP results in the following panic:
    
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x560447ec0e43]
    goroutine 663 [running]:
    github.com/bluenviron/gohlslib.(*muxerSegmentFMP4).finalize(0xc0006101c0, 0x0)
            github.com/bluenviron/gohlslib@v1.2.1/muxer_segment_fmp4.go:83 +0x23
    github.com/bluenviron/gohlslib.(*muxerSegmenterFMP4).close(0xc00016a240)
            github.com/bluenviron/gohlslib@v1.2.1/muxer_segmenter_fmp4.go:131 +0x29
    github.com/bluenviron/gohlslib.(*Muxer).Close(0xc000404140)
            github.com/bluenviron/gohlslib@v1.2.1/muxer.go:202 +0x38
    github.com/bluenviron/mediamtx/internal/servers/hls.(*muxer).runInner(0xc0002a0120, {0x560448714258, 0xc0003da500}, 0xc0011f3fa0?)
            github.com/bluenviron/mediamtx/internal/servers/hls/muxer.go:288 +0xb30
    github.com/bluenviron/mediamtx/internal/servers/hls.(*muxer).run.func1.1.1()
            github.com/bluenviron/mediamtx/internal/servers/hls/muxer.go:140 +0x32
    created by github.com/bluenviron/mediamtx/internal/servers/hls.(*muxer).run.func1.1 in goroutine 662
            github.com/bluenviron/mediamtx/internal/servers/hls/muxer.go:139 +0x170
    
    This commit addresses the panic, but does not fix the underlying issue with this particular codec combination.
    database64128 committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    c614797 View commit details
    Browse the repository at this point in the history