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

Prevent crash when audio codec is invalid #1995

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Oct 18, 2024

From roku crash log 2.1.8

if LCase(selectedAudioStream.Codec) = "aac"
Type Mismatch. (runtime error &h18) in pkg:/source/api/Items.brs(45) 
Backtrace: 
#3  Function itempostplaybackinfo(id As String, mediasourceid As String, audiotrackindex As Integer, subtitletrackindex As Integer, starttimeticks As LongInteger) As Dynami$1 file/line: pkg:/source/api/Items.brs(45) 
#2  Function loaditems_addvideocontent(video As Object, mediasourceid As Dynamic, audio_stream_idx As Integer, forcetranscoding As Boolean) As Voi$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(138) 
#1  Function loaditems_videoplayer(id As String, mediasourceid As Dynamic, audio_stream_idx As Integer, forcetranscoding As Boolean) As Dynami$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(55) 
#0  Function loaditems() As Voi$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(47) 
Local Variables: 
id               roString (2.1 was String) refcnt=7 val:"6c9c3889ad597ffdbe8d66ec365cef8e" 
mediasourceid    roString (2.1 was String) refcnt=7 val:"6c9c3889ad597ffdbe8d66ec365cef8e" 
audiotrackindex  Integer val:1 (&h1) 
subtitletrackindex Integer val:-2 (&hFFFFFFFE) 
starttimeticks   LongInteger refcnt=3 val:0 (&h0) 
global           Interface:ifGloba$1 m                roAssociativeArray refcnt=5 count:2 
params           roAssociativeArray refcnt=1 count:9 
deviceprofile    roAssociativeArray refcnt=1 count:17 
myglobal         roSGNode:Node refcnt=2 
selectedaudiostream roAssociativeArray refcnt=1 count:18 
rule             <uninitialized> 
req              <uninitialized>

Issues

@cewert cewert added the bug-fix This fixes a bug. label Oct 18, 2024
@cewert cewert requested a review from a team as a code owner October 18, 2024 02:20
@cewert cewert merged commit 0c80285 into jellyfin:2.2.z Oct 18, 2024
5 checks passed
@cewert cewert deleted the fix-postplaybackinfo-crash branch October 18, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants