Make FallbackListener.onTransformationRequestFinalized() synchronized

FallbackListener.onTransformationRequestFinalized() is called from the
AssetLoader thread for audio, and from the GL thread for video.

PiperOrigin-RevId: 542851284
This commit is contained in:
kimvde 2023-06-23 14:15:35 +00:00 committed by Tofunmi Adigun-Hameed
parent 90c8f642af
commit bdd593e0d3

View File

@ -89,7 +89,8 @@ import java.util.concurrent.atomic.AtomicInteger;
* @throws IllegalStateException If called for more tracks than declared in {@link
* #setTrackCount(int)}.
*/
public void onTransformationRequestFinalized(TransformationRequest transformationRequest) {
public synchronized void onTransformationRequestFinalized(
TransformationRequest transformationRequest) {
checkState(trackCount.getAndDecrement() > 0);
TransformationRequest.Builder fallbackRequestBuilder =