Buggy code:
public class DashVodRendererBuilder implements RendererBuilder , ManifestCallback < MediaPresentationDescription > { private static final int BUFFER_SEGMENT_SIZE = 64 * 1024 ; private static final int VIDEO_BUFFER_SEGMENTS = 200 ; private static final int AUDIO_BUFFER_SEGMENTS = 60 ; private static final int SECURITY_LEVEL_UNKNOWN = - 1 ; private static final int SECURITY_LEVEL_1 = 1 ; private static final int SECURITY_LEVEL_3 = 3 ; private final String userAgent ; private final String url ; private final String contentId ; private final MediaDrmCallback drmCallback ; private final TextView debugTextView ; private DemoPlayer player ; private RendererBuilderCallback callback ; public DashVodRendererBuilder ( String userAgent , String url , String contentId , MediaDrmCallback drmCallback , TextView debugTextView ) { } @ Override public void buildRenderers ( DemoPlayer player , RendererBuilderCallback callback ) { } @ Override public void onManifestError ( String contentId , Exception e ) { } @ Override public void onManifest ( String contentId , MediaPresentationDescription manifest ) { Handler mainHandler = player . getMainHandler ( ) ; LoadControl loadControl = new com . google . android . exoplayer . DefaultLoadControl ( new BufferPool ( DashVodRendererBuilder . BUFFER_SEGMENT_SIZE ) ) ; DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter ( mainHandler , player ) ; int maxDecodableFrameSize = MediaCodecUtil . maxH264DecodableFrameSize ( ) ; ArrayList < Representation > audioRepresentationsList = new ArrayList < Representation > ( ) ; ArrayList < Representation > videoRepresentationsList = new ArrayList < Representation > ( ) ; Period period = manifest . periods . get ( 0 ) ; boolean hasContentProtection = false ; for ( int i = 0 ; i < ( period . adaptationSets . size ( ) ) ; i ++ ) { AdaptationSet adaptationSet = period . adaptationSets . get ( i ) ; hasContentProtection |= adaptationSet . hasContentProtection ( ) ; int adaptationSetType = adaptationSet . type ; for ( int j = 0 ; j < ( adaptationSet . representations . size ( ) ) ; j ++ ) { Representation representation = adaptationSet . representations . get ( j ) ; if ( adaptationSetType == ( AdaptationSet . TYPE_AUDIO ) ) { audioRepresentationsList . add ( representation ) ; } else if ( adaptationSetType == ( AdaptationSet . TYPE_VIDEO ) ) { Format format = representation . format ; if ( ( ( format . width ) * ( format . height ) ) <= maxDecodableFrameSize ) { videoRepresentationsList . add ( representation ) ; } else { } } } } Representation [ ] videoRepresentations = new Representation [ videoRepresentationsList . size ( ) ] ; videoRepresentationsList . toArray ( videoRepresentations ) ; DrmSessionManager drmSessionManager = null ; if ( hasContentProtection ) { if ( ( Util . SDK_INT ) < 18 ) { callback . onRenderersError ( new UnsupportedOperationException ( ( "Protected<seq2seq4repair_space>content<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>API<seq2seq4repair_space>level<seq2seq4repair_space>" + ( Util . SDK_INT ) ) ) ) ; return ; } try { Pair < DrmSessionManager , Boolean > drmSessionManagerData = DashVodRendererBuilder . V18Compat . getDrmSessionManagerData ( player , drmCallback ) ; drmSessionManager = drmSessionManagerData . first ; if ( ! ( drmSessionManagerData . second ) ) { videoRepresentations = getSdRepresentations ( videoRepresentations ) ; } <START_BUG> } catch ( UnsupportedSchemeException e ) { <END_BUG> callback . onRenderersError ( e ) ; return ; } } DataSource videoDataSource = new HttpDataSource ( userAgent , HttpDataSource . REJECT_PAYWALL_TYPES , bandwidthMeter ) ; ChunkSource videoChunkSource ; String mimeType = videoRepresentations [ 0 ] . format . mimeType ; if ( mimeType . equals ( VIDEO_MP4 ) ) { videoChunkSource = new com . google . android . exoplayer . dash . DashMp4ChunkSource ( videoDataSource , new com . google . android . exoplayer . chunk . FormatEvaluator . AdaptiveEvaluator ( bandwidthMeter ) , videoRepresentations ) ; } else if ( mimeType . equals ( VIDEO_WEBM ) ) { videoRepresentations = getSdRepresentations ( videoRepresentations ) ; videoChunkSource = new com . google . android . exoplayer . dash . DashWebmChunkSource ( videoDataSource , new com . google . android . exoplayer . chunk . FormatEvaluator . AdaptiveEvaluator ( bandwidthMeter ) , videoRepresentations ) ; } else { throw new IllegalStateException ( ( "Unexpected<seq2seq4repair_space>mime<seq2seq4repair_space>type:<seq2seq4repair_space>" + mimeType ) ) ; } ChunkSampleSource videoSampleSource = new ChunkSampleSource ( videoChunkSource , loadControl , ( ( DashVodRendererBuilder . VIDEO_BUFFER_SEGMENTS ) * ( DashVodRendererBuilder . BUFFER_SEGMENT_SIZE ) ) , true , mainHandler , player , DemoPlayer . TYPE_VIDEO ) ; MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer ( videoSampleSource , drmSessionManager , true , MediaCodec . VIDEO_SCALING_MODE_SCALE_TO_FIT , 5000 , mainHandler , player , 50 ) ; final String [ ] audioTrackNames ; final MultiTrackChunkSource audioChunkSource ; final MediaCodecAudioTrackRenderer audioRenderer ; if ( audioRepresentationsList . isEmpty ( ) ) { audioTrackNames = null ; audioChunkSource = null ; audioRenderer = null ; } else { DataSource audioDataSource = new HttpDataSource ( userAgent , HttpDataSource . REJECT_PAYWALL_TYPES , bandwidthMeter ) ; audioTrackNames = new String [ audioRepresentationsList . size ( ) ] ; ChunkSource [ ] audioChunkSources = new ChunkSource [ audioRepresentationsList . size ( ) ] ; FormatEvaluator audioEvaluator = new FormatEvaluator . FixedEvaluator ( ) ; for ( int i = 0 ; i < ( audioRepresentationsList . size ( ) ) ; i ++ ) { Representation representation = audioRepresentationsList . get ( i ) ; Format format = representation . format ; audioTrackNames [ i ] = ( ( ( ( ( format . id ) + "<seq2seq4repair_space>(" ) + ( format . numChannels ) ) + "ch,<seq2seq4repair_space>" ) + ( format . audioSamplingRate ) ) + "Hz)" ; audioChunkSources [ i ] = new com . google . android . exoplayer . dash . DashMp4ChunkSource ( audioDataSource , audioEvaluator , representation ) ; } audioChunkSource = new MultiTrackChunkSource ( audioChunkSources ) ; SampleSource audioSampleSource = new ChunkSampleSource ( audioChunkSource , loadControl , ( ( DashVodRendererBuilder . AUDIO_BUFFER_SEGMENTS ) * ( DashVodRendererBuilder . BUFFER_SEGMENT_SIZE ) ) , true , mainHandler , player , DemoPlayer . TYPE_AUDIO ) ; audioRenderer = new MediaCodecAudioTrackRenderer ( audioSampleSource , drmSessionManager , true , mainHandler , player ) ; }

Fix:
} catch ( Exception e ) {