Skip to content

Commit

Permalink
Fix video restarting immediately when baking subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Oct 30, 2024
1 parent 1062d7b commit b3beb8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ public void onResponse(StreamInfo internalResponse) {
if (mVideoManager == null)
return;
mCurrentOptions = internalOptions;
if (internalOptions.getSubtitleStreamIndex() == null) burningSubs = internalResponse.getSubtitleDeliveryMethod() == SubtitleDeliveryMethod.Encode;
startItem(item, position, internalResponse);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class MediaCodecCapabilitiesTest {
maxLevel = maxOf(maxLevel, profileLevel.level)
}
}
} catch (e: IllegalArgumentException) {
Timber.d(e, "Decoder %s does not support %s", info.name, mime)
} catch (_: IllegalArgumentException) {
// Decoder not supported - ignore
}
}

Expand All @@ -146,8 +146,8 @@ class MediaCodecCapabilitiesTest {

if (profileLevel.level >= level) return true
}
} catch (e: IllegalArgumentException) {
Timber.w(e)
} catch (_: IllegalArgumentException) {
// Decoder not supported - ignore
}
}

Expand Down Expand Up @@ -183,8 +183,8 @@ class MediaCodecCapabilitiesTest {
maxWidth = maxOf(maxWidth, supportedWidth)
maxHeight = maxOf(maxHeight, supportedHeight)

} catch (e: IllegalArgumentException) {
Timber.d(e, "Codec %s does not support video capabilities", info.name)
} catch (_: IllegalArgumentException) {
// Decoder not supported - ignore
}
}

Expand Down

0 comments on commit b3beb8a

Please sign in to comment.