Skip to content

Commit

Permalink
fix(android): check for valid width and height on video format data (#…
Browse files Browse the repository at this point in the history
…4394)

Co-authored-by: mehdi <[email protected]>
  • Loading branch information
mmttt89 and mehdi authored Jan 27, 2025
1 parent 638f454 commit ad52668
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ class ExoPlayerView(private val context: Context) :
if (group.type == C.TRACK_TYPE_VIDEO && group.length > 0) {
// get the first track of the group to identify aspect ratio
val format = group.getTrackFormat(0)
layout.updateAspectRatio(format)
if (format.width > 0 || format.height > 0) {
layout.updateAspectRatio(format)
}
return
}
}
Expand Down

0 comments on commit ad52668

Please sign in to comment.