fix: initialize demuxer_opts to NULL in transcode_init#446
Merged
Conversation
53c3bc7 to
056ee84
Compare
The demuxer_opts pointer was left uninitialized when inp->demuxer.opts was NULL. This caused avformat_open_input to receive a garbage pointer, leading to a crash in av_dict_copy when processing dictionary options. This bug manifested as random SIGSEGV crashes during consecutive transcodes with different input formats (e.g., TestAPI_ConsecutiveMP4s). Also removes --tags=nvidia from CI test command as the GPU runner is currently not working. Signed-off-by: livepeer-tessa <livepeer-tessa@users.noreply.github.com>
056ee84 to
bd89b20
Compare
livepeer-tessa
added a commit
that referenced
this pull request
Mar 10, 2026
Reverts the test tag removal from #446. The GPU runner is now working. Signed-off-by: livepeer-tessa <livepeer-tessa@users.noreply.github.com>
j0sh
pushed a commit
that referenced
this pull request
Mar 10, 2026
Reverts the test tag removal from #446. The GPU runner is now working. Also set the test timeout to 1 hour. Signed-off-by: livepeer-tessa <livepeer-tessa@users.noreply.github.com> Co-authored-by: livepeer-tessa <livepeer-tessa@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
demuxer_optspointer intranscode_init()was left uninitialized wheninp->demuxer.optswas NULL. This causedavformat_open_inputto receive a garbage pointer, leading to a crash inav_dict_copywhen processing dictionary options.Root Cause
Fix
Initialize the pointer to NULL:
Testing
TestAPI_ConsecutiveMP4snow passes (was crashing with SIGSEGV)How it was found
Used GDB and AddressSanitizer to trace the crash:
avformat_open_inputav_dict_copyin libavutildemuxer_optspointer