{"action":"created","issue":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/1446","repository_url":"https://api.github.com/repos/google/ExoPlayer","labels_url":"https://api.github.com/repos/google/ExoPlayer/issues/1446/labels{/name}","comments_url":"https://api.github.com/repos/google/ExoPlayer/issues/1446/comments","events_url":"https://api.github.com/repos/google/ExoPlayer/issues/1446/events","html_url":"https://github.com/google/ExoPlayer/issues/1446","id":148601777,"number":1446,"title":"The player sometimes gets stuck on buffering state and doesn't return to ready state","user":{"login":"Zo2m4bie","id":4004436,"avatar_url":"https://avatars.githubusercontent.com/u/4004436?v=3","gravatar_id":"","url":"https://api.github.com/users/Zo2m4bie","html_url":"https://github.com/Zo2m4bie","followers_url":"https://api.github.com/users/Zo2m4bie/followers","following_url":"https://api.github.com/users/Zo2m4bie/following{/other_user}","gists_url":"https://api.github.com/users/Zo2m4bie/gists{/gist_id}","starred_url":"https://api.github.com/users/Zo2m4bie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zo2m4bie/subscriptions","organizations_url":"https://api.github.com/users/Zo2m4bie/orgs","repos_url":"https://api.github.com/users/Zo2m4bie/repos","events_url":"https://api.github.com/users/Zo2m4bie/events{/privacy}","received_events_url":"https://api.github.com/users/Zo2m4bie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"AquilesCanta","id":8539544,"avatar_url":"https://avatars.githubusercontent.com/u/8539544?v=3","gravatar_id":"","url":"https://api.github.com/users/AquilesCanta","html_url":"https://github.com/AquilesCanta","followers_url":"https://api.github.com/users/AquilesCanta/followers","following_url":"https://api.github.com/users/AquilesCanta/following{/other_user}","gists_url":"https://api.github.com/users/AquilesCanta/gists{/gist_id}","starred_url":"https://api.github.com/users/AquilesCanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AquilesCanta/subscriptions","organizations_url":"https://api.github.com/users/AquilesCanta/orgs","repos_url":"https://api.github.com/users/AquilesCanta/repos","events_url":"https://api.github.com/users/AquilesCanta/events{/privacy}","received_events_url":"https://api.github.com/users/AquilesCanta/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-04-15T09:01:10Z","updated_at":"2016-04-22T11:45:13Z","closed_at":"2016-04-20T09:01:20Z","body":"Hi. I faced of with issues when the player goes to buffer state and it doesn't go back to ready state again(and I didn't receive any error). I play hls stream and sometimes it just happens, first time I reproduced after playing  0.5h, second time player's working more that 2 hours before going in \"forever\" buffer state, third time I received  \"forever\" buffer state after around 5 hours, last time I received it after around 15 mintes watching channel). \r\nHere some data from lib:\r\nI looked at HlsSampleSource [maybeStartLoading method](https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java#L682), when the player stucks I always return in \r\n\r\n`if (loader.isLoading() || !nextLoader) {\r\n      return;\r\n    }`\r\n\r\nbecause nextLoader always = false\r\nand it's because I received \r\ncurrentBufferSize = 20250624\r\ntargetBufferSize = 16777216\r\nand [here](https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/DefaultLoadControl.java#L190)  it always return false because currentBufferSize was bigger than  targetBufferSize.\r\n\r\nAlso in HlsSampleSource [readData](https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java#L294) return NOTHING_READ [here](https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java#L348)\r\n\r\nI tried it in v.: 1.5.0 and I tried it in v.: 1.5.7 it reproduces here too. I cannot provide link right now, but perheps you can tell me why it may heppen. "},"comment":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/comments/213390391","html_url":"https://github.com/google/ExoPlayer/issues/1446#issuecomment-213390391","issue_url":"https://api.github.com/repos/google/ExoPlayer/issues/1446","id":213390391,"user":{"login":"Zo2m4bie","id":4004436,"avatar_url":"https://avatars.githubusercontent.com/u/4004436?v=3","gravatar_id":"","url":"https://api.github.com/users/Zo2m4bie","html_url":"https://github.com/Zo2m4bie","followers_url":"https://api.github.com/users/Zo2m4bie/followers","following_url":"https://api.github.com/users/Zo2m4bie/following{/other_user}","gists_url":"https://api.github.com/users/Zo2m4bie/gists{/gist_id}","starred_url":"https://api.github.com/users/Zo2m4bie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zo2m4bie/subscriptions","organizations_url":"https://api.github.com/users/Zo2m4bie/orgs","repos_url":"https://api.github.com/users/Zo2m4bie/repos","events_url":"https://api.github.com/users/Zo2m4bie/events{/privacy}","received_events_url":"https://api.github.com/users/Zo2m4bie/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T11:45:13Z","updated_at":"2016-04-22T11:45:13Z","body":"@AquilesCanta so far I found that this bug is device specific . This device have many issues with exo player and some of them are very strange like [this](https://github.com/google/ExoPlayer/issues/1411) \r\nAlso if someone faced with the same issue, for me helped restarting player when [currentBufferSize >= targetBufferSize](https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/DefaultLoadControl.java#L190)"}}