fix(android): check for valid width and height on video format data (#4394)

Co-authored-by: mehdi <m.taghdisi@digikala.com>
This commit is contained in:
Mehdi Taghdisi
2025-01-27 21:13:30 +03:30
committed by GitHub
parent 638f454a21
commit ad52668d05

View File

@@ -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)
if (format.width > 0 || format.height > 0) {
layout.updateAspectRatio(format)
}
return
}
}