Fix missing id error

PiperOrigin-RevId: 469750922
This commit is contained in:
rohks 2022-08-24 16:40:39 +00:00 committed by Marc Baechinger
parent a2139109e3
commit 2c70383d38

View File

@ -15,6 +15,8 @@
*/ */
package com.google.android.exoplayer2.gldemo; package com.google.android.exoplayer2.gldemo;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@ -83,7 +85,8 @@ public final class MainActivity extends Activity {
VideoProcessingGLSurfaceView videoProcessingGLSurfaceView = VideoProcessingGLSurfaceView videoProcessingGLSurfaceView =
new VideoProcessingGLSurfaceView( new VideoProcessingGLSurfaceView(
context, requestSecureSurface, new BitmapOverlayVideoProcessor(context)); context, requestSecureSurface, new BitmapOverlayVideoProcessor(context));
FrameLayout contentFrame = findViewById(R.id.exo_content_frame); checkNotNull(playerView);
FrameLayout contentFrame = playerView.findViewById(R.id.exo_content_frame);
contentFrame.addView(videoProcessingGLSurfaceView); contentFrame.addView(videoProcessingGLSurfaceView);
this.videoProcessingGLSurfaceView = videoProcessingGLSurfaceView; this.videoProcessingGLSurfaceView = videoProcessingGLSurfaceView;
} }