Skip to content
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

Specific mkv video fails with "ParserException: Error parsing vorbis codec private" #8496

Closed
moneytoo opened this issue Jan 23, 2021 · 2 comments
Assignees
Labels

Comments

@moneytoo
Copy link
Contributor

Trying to play this video http://streams.videolan.org/samples/Matroska/haruhi.mkv with ExoPlayer, it fails with following exception:

E/ExoPlayerImplInternal: Playback error
      com.google.android.exoplayer2.ExoPlaybackException: Source error
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:554)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:214)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: com.google.android.exoplayer2.ParserException: Error parsing vorbis codec private
        at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor$Track.parseVorbisCodecPrivate(MatroskaExtractor.java:2422)
        at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor$Track.initializeOutput(MatroskaExtractor.java:2051)
        at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.endMasterElement(MatroskaExtractor.java:760)
        at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor$InnerEbmlProcessor.endMasterElement(MatroskaExtractor.java:1833)
        at com.google.android.exoplayer2.extractor.mkv.DefaultEbmlReader.read(DefaultEbmlReader.java:87)
        at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.read(MatroskaExtractor.java:490)
        at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
        at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1050)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

The same video plays just fine (both picture and sound) in system VideoView.

  • ExoPlayer version number: 2.12.3
  • Android version: 10
  • Android device: OnePlus 7
@kim-vde
Copy link
Contributor

kim-vde commented Jan 26, 2021

This is indeed a bug. I will implement a fix.

kim-vde added a commit that referenced this issue Jan 26, 2021
- Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
  byte and to int again (due to numeric promotion).
- Fix addition of int and byte with most significant bit set. The byte
  was incorrectly promoted to an int negative value.

Issue:#8496
#minor-release
PiperOrigin-RevId: 353865751
@kim-vde
Copy link
Contributor

kim-vde commented Jan 26, 2021

I added the fix to the dev-v2 branch. It will be added to the release-v2 branch in a few weeks, when ExoPlayer 2.13 is released.

@kim-vde kim-vde closed this as completed Jan 26, 2021
ojw28 pushed a commit that referenced this issue Feb 4, 2021
- Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
  byte and to int again (due to numeric promotion).
- Fix addition of int and byte with most significant bit set. The byte
  was incorrectly promoted to an int negative value.

Issue:#8496
#minor-release
PiperOrigin-RevId: 353865751
@google google locked and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants