danikula / AndroidVideoCache

Cache support for any video player with help of single line
Apache License 2.0
5.43k stars 1.16k forks source link

Error reading data URL #60

Closed meness closed 8 years ago

meness commented 8 years ago

Hi,

Sometimes following exception will be thrown.

Note: I'm using the latest version of the AndroidVideoCache.

ProxyCache error
com.danikula.videocache.ProxyCacheException: Error reading data from http://collectup.blob.core.windows.net/videos/fc16f22a-e458-4056-8218-1d17ddbadb37.mp4
    at com.danikula.videocache.HttpUrlSource.read(HttpUrlSource.java:99)
    at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:126)
    at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19)
    at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:179)
    at java.lang.Thread.run(Thread.java:856)
 Caused by: java.net.SocketException: Socket is closed
    at java.net.PlainSocketImpl.checkNotClosed(PlainSocketImpl.java:134)
    at java.net.PlainSocketImpl.available(PlainSocketImpl.java:140)
    at java.net.PlainSocketImpl$PlainSocketInputStream.available(PlainSocketImpl.java:228)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:328)
    at libcore.net.http.FixedLengthInputStream.read(FixedLengthInputStream.java:45)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:304)
    at com.danikula.videocache.HttpUrlSource.read(HttpUrlSource.java:95)
    at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:126) 
    at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19) 
    at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:179) 
    at java.lang.Thread.run(Thread.java:856) 
josemllz commented 8 years ago

I have the same problem as you, is there any solution to solve this?

aliselcuk commented 8 years ago

Same here, E/MediaPlayer: error (1, -1007)

Works fine with the original url but not with the cached one.

shaopx commented 8 years ago

try this https://github.com/danikula/AndroidVideoCache/pull/70

danikula commented 8 years ago

Fixed in 2.5.0