Android : Error from MediaPlayer playing HLS live stream in Android 5.1

on Sunday, March 22, 2015


I'm getting an odd error from MediaPlayer while playing a live stream. The code was working perfectly before I upgraded my Nexus 10 to 5.1 from 5.0.x.


I get the error: error (-2147483648, 0) in the onError handler and have to stop the video. If I put a breakpoint in the error handler, the video plays perfectly on the device, so I don't know why it throws the error nor what it means.


I've tried debugging the MediaPlayer sources, but for some reason the binary on the device does not match the sources I have for 5.1. Either way it seems the error is coming up from the Native code.


I am able to play other media sources with he same code, it seems only the media with no duration information causes the error.


Here is the only useful info I get out of the log:



03-21 23:02:22.365: W/MediaPlayer(26062): info/warning (801, 0)
03-21 23:02:22.401: D/MediaPlayer(26062): getMetadata
03-21 23:02:22.416: W/MediaPlayer(26062): Stream has no duration and is therefore not seekable.
03-21 23:02:22.416: E/MediaPlayer(26062): error (-2147483648, 0)
03-21 23:02:22.427: E/MediaPlayer(26062): Error (-2147483648,0)
03-21 23:02:22.443: D/VideoView(26062): Error: -2147483648,0
03-21 23:02:22.446: W/Tag(26062): Playback error in -2147483648 info: 0
03-21 23:02:22.492: W/MediaPlayer(26062): info/warning (3, 0)

0 comments:

Post a Comment