Commit cfefdbc1 by tonihei Committed by Toni

Release DownloadHelper automatically if preparation failed.

This prevents further unexpected updates if the MediaSource happens to
finish its preparation at a later point.

Issue:#5915
PiperOrigin-RevId: 249439246
parent 118218cc
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
([#5891](https://github.com/google/ExoPlayer/issues/5891)). ([#5891](https://github.com/google/ExoPlayer/issues/5891)).
* Add ProgressUpdateListener to PlayerControlView * Add ProgressUpdateListener to PlayerControlView
([#5834](https://github.com/google/ExoPlayer/issues/5834)). ([#5834](https://github.com/google/ExoPlayer/issues/5834)).
* Prevent unexpected `DownloadHelper.Callback.onPrepared` callbacks after the
preparation of the `DownloadHelper` failed
([#5915](https://github.com/google/ExoPlayer/issues/5915)).
### 2.10.1 ### ### 2.10.1 ###
......
...@@ -943,6 +943,7 @@ public final class DownloadHelper { ...@@ -943,6 +943,7 @@ public final class DownloadHelper {
downloadHelper.onMediaPrepared(); downloadHelper.onMediaPrepared();
return true; return true;
case DOWNLOAD_HELPER_CALLBACK_MESSAGE_FAILED: case DOWNLOAD_HELPER_CALLBACK_MESSAGE_FAILED:
release();
downloadHelper.onMediaPreparationFailed((IOException) Util.castNonNull(msg.obj)); downloadHelper.onMediaPreparationFailed((IOException) Util.castNonNull(msg.obj));
return true; return true;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment