{"action":"created","issue":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/278","labels_url":"https://api.github.com/repos/google/ExoPlayer/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/google/ExoPlayer/issues/278/comments","events_url":"https://api.github.com/repos/google/ExoPlayer/issues/278/events","html_url":"https://github.com/google/ExoPlayer/issues/278","id":56494467,"number":278,"title":"TsExtractor bug","user":{"login":"crossle","id":1675131,"avatar_url":"https://avatars.githubusercontent.com/u/1675131?v=3","gravatar_id":"","url":"https://api.github.com/users/crossle","html_url":"https://github.com/crossle","followers_url":"https://api.github.com/users/crossle/followers","following_url":"https://api.github.com/users/crossle/following{/other_user}","gists_url":"https://api.github.com/users/crossle/gists{/gist_id}","starred_url":"https://api.github.com/users/crossle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossle/subscriptions","organizations_url":"https://api.github.com/users/crossle/orgs","repos_url":"https://api.github.com/users/crossle/repos","events_url":"https://api.github.com/users/crossle/events{/privacy}","received_events_url":"https://api.github.com/users/crossle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/ExoPlayer/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-04T08:27:23Z","updated_at":"2015-02-09T16:47:01Z","closed_at":null,"body":"Device android 4.4, Test [link]( https://dn-hls-233-tv-cn-bj-01.qbox.me/54d10b6e695a325d2fa90000/54d11617695a321622c00000/source/index.m3u8), about 3~4 second, the logcat print many below line, frequently gc, and  result in the UI get stuck,(you can add progressbar on the top of surfaceview)\r\n```\r\n D/dalvikvm( 5562): GC_FOR_ALLOC freed 4962K, 19% free 81591K/100428K, paused 74ms, total 74ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 4971K, 19% free 81592K/100428K, paused 73ms, total 73ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 4979K, 19% free 81593K/100428K, paused 72ms, total 72ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 4988K, 19% free 81594K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 4997K, 19% free 81596K/100428K, paused 56ms, total 56ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5006K, 19% free 81597K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5015K, 19% free 81598K/100428K, paused 61ms, total 61ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5023K, 19% free 81599K/100428K, paused 67ms, total 67ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5032K, 19% free 81601K/100428K, paused 62ms, total 62ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5041K, 19% free 81602K/100428K, paused 61ms, total 61ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5051K, 19% free 81604K/100428K, paused 62ms, total 62ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5059K, 19% free 81605K/100428K, paused 59ms, total 59ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5068K, 19% free 81606K/100428K, paused 61ms, total 61ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5076K, 19% free 81607K/100428K, paused 63ms, total 63ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5085K, 19% free 81608K/100428K, paused 59ms, total 59ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5094K, 19% free 81609K/100428K, paused 57ms, total 57ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5103K, 19% free 81611K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5111K, 19% free 81612K/100428K, paused 62ms, total 62ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5120K, 19% free 81613K/100428K, paused 59ms, total 59ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5129K, 19% free 81615K/100428K, paused 59ms, total 59ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5139K, 19% free 81616K/100428K, paused 71ms, total 71ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5147K, 19% free 81617K/100428K, paused 61ms, total 61ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5155K, 19% free 81619K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5164K, 19% free 81620K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5173K, 19% free 81621K/100428K, paused 57ms, total 57ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5182K, 19% free 81622K/100428K, paused 57ms, total 57ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5191K, 19% free 81624K/100428K, paused 55ms, total 55ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5200K, 19% free 81625K/100428K, paused 57ms, total 57ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5208K, 19% free 81626K/100428K, paused 59ms, total 59ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5217K, 19% free 81627K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5226K, 19% free 81629K/100428K, paused 58ms, total 58ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5235K, 19% free 81630K/100428K, paused 56ms, total 56ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5244K, 19% free 81631K/100428K, paused 56ms, total 56ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5252K, 19% free 81632K/100428K, paused 62ms, total 62ms\r\nD/dalvikvm( 5562): GC_FOR_ALLOC freed 5261K, 19% free 81634K/100428K, paused 72ms, total 72ms\r\n```\r\nif the link no valid for u, you can download from [dropbox](https://www.dropbox.com/sh/p744vis5lv5kkh1/AADVSRb64J1EFNnrUtvptNL2a?dl=0), and use local http server test."},"comment":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/comments/73542915","html_url":"https://github.com/google/ExoPlayer/issues/278#issuecomment-73542915","issue_url":"https://api.github.com/repos/google/ExoPlayer/issues/278","id":73542915,"user":{"login":"ojw28","id":7881572,"avatar_url":"https://avatars.githubusercontent.com/u/7881572?v=3","gravatar_id":"","url":"https://api.github.com/users/ojw28","html_url":"https://github.com/ojw28","followers_url":"https://api.github.com/users/ojw28/followers","following_url":"https://api.github.com/users/ojw28/following{/other_user}","gists_url":"https://api.github.com/users/ojw28/gists{/gist_id}","starred_url":"https://api.github.com/users/ojw28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojw28/subscriptions","organizations_url":"https://api.github.com/users/ojw28/orgs","repos_url":"https://api.github.com/users/ojw28/repos","events_url":"https://api.github.com/users/ojw28/events{/privacy}","received_events_url":"https://api.github.com/users/ojw28/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T16:47:00Z","updated_at":"2015-02-09T16:47:00Z","body":"Sample objects are already pooled. The ideal solution would probably be to keep data in TsPacket sized buffers right up until the samples are actually read from the extractor. Rather than copying sample data out of TsPacket buffers into intermediate Sample objects, we'd instead only parse out the information we need, such as where the sample data boundaries are within these buffers. We'd then copy directly from TsPacket buffers into SampleHolders on demand.\r\n\r\nThis is a pretty big change, and may be pretty complicated to pull off. But it would solve the issue."}}