-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to play content with 8-byte IV after playing content with 16-byte IV #6982
Labels
Comments
icbaker
pushed a commit
that referenced
this issue
Feb 17, 2020
CryptoInfo.iv length is always 16. When the actual initialization vector is shorter, zero out the trailing bytes. Issue: #6982 PiperOrigin-RevId: 295575845
Thanks for the clear issue report. This has always been broken (!), so I guess your use case isn't a particularly common one :). It should be fixed by the change above; please let us know if you still see any issues. |
ojw28
added a commit
that referenced
this issue
Feb 18, 2020
CryptoInfo.iv length is always 16. When the actual initialization vector is shorter, zero out the trailing bytes. Issue: #6982 PiperOrigin-RevId: 295575845
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue description
Playing 8-byte IV content after 16-byte IV content on a single instance of ExoPlayer results in a garbled video.
Reproduction steps
Let's assuming we have 2 DASH content items: one with 16-byte IV and the second with 8-byte IV.
Create an instance of ExoPlayerImpl and play both items in order on a single ExoPlayerImpl instance.
I.e.
a) prepare the 16-byte IV item
b) play it
c) stop
d) prepare the 8-byte IV item
Here the playback breaks.
Link to test content
Was observed on a proprietary content.
A full bug report captured from the device
N/A
Version of ExoPlayer being used
2.9.4 and 2.10.6
Device(s) and version(s) of Android being used
Was observed on many devices. For example on FireTv 4K stick.
NOTE: Location of the issue in the code:
The com.google.android.exoplayer2.source.SampleQueue.readEncryptionData()
method allocates buffer.cryptoInfo.iv if one is not already allocated.
However, if buffer.cryptoInfo.iv is already allocated and contains an old IV, the array is not cleaned.
So, if ivSize in readData(offset, buffer.cryptoInfo.iv, ivSize) is smaller than it was for the previous IVs
we get a wrong value for IV
The text was updated successfully, but these errors were encountered: