mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Delete created GL programs
PiperOrigin-RevId: 554832238
This commit is contained in:
parent
57086b6641
commit
5c78290d5a
3 changed files with 32 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ package androidx.media3.effect;
|
|||
|
||||
import android.content.Context;
|
||||
import android.opengl.GLES20;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.media3.common.GlTextureInfo;
|
||||
import androidx.media3.common.VideoFrameProcessingException;
|
||||
import androidx.media3.common.util.GlProgram;
|
||||
|
|
@ -82,4 +83,15 @@ import java.io.IOException;
|
|||
throw VideoFrameProcessingException.from(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void release() throws VideoFrameProcessingException {
|
||||
super.release();
|
||||
try {
|
||||
copyProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new VideoFrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,4 +91,14 @@ import java.io.IOException;
|
|||
throw new VideoFrameProcessingException(e, presentationTimeUs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() throws VideoFrameProcessingException {
|
||||
super.release();
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new VideoFrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,4 +86,14 @@ import java.io.IOException;
|
|||
throw new VideoFrameProcessingException(e, presentationTimeUs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() throws VideoFrameProcessingException {
|
||||
super.release();
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new VideoFrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue