From c97ea1701a5808ba06d7011014a30274feac4fa7 Mon Sep 17 00:00:00 2001 From: xufuji456 Date: Fri, 21 Oct 2022 11:13:45 +0800 Subject: [PATCH] Feature: change 0 to null --- app/src/main/cpp/video_filter.c | 2 +- app/src/main/cpp/video_player.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/video_filter.c b/app/src/main/cpp/video_filter.c index be978fc..aabbc8b 100644 --- a/app/src/main/cpp/video_filter.c +++ b/app/src/main/cpp/video_filter.c @@ -344,7 +344,7 @@ VIDEO_PLAYER_FUNC(jint, filter, jstring filePath, jobject surface, jint position if (ret >= 0) { // lock native window ANativeWindow_Buffer windowBuffer; - ANativeWindow_lock(nativeWindow, &windowBuffer, 0); + ANativeWindow_lock(nativeWindow, &windowBuffer, NULL); // convert sws_scale(sws_ctx, (uint8_t const *const *) filter_frame->data, filter_frame->linesize, 0, pCodecCtx->height, diff --git a/app/src/main/cpp/video_player.cpp b/app/src/main/cpp/video_player.cpp index f490a7f..69b4907 100644 --- a/app/src/main/cpp/video_player.cpp +++ b/app/src/main/cpp/video_player.cpp @@ -105,7 +105,7 @@ VIDEO_PLAYER_FUNC(jint, play, jstring filePath, jobject surface) { avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); if (frameFinished) { // lock native window - ANativeWindow_lock(nativeWindow, &windowBuffer, 0); + ANativeWindow_lock(nativeWindow, &windowBuffer, nullptr); sws_scale(sws_ctx, (uint8_t const *const *) pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGBA->data, pFrameRGBA->linesize);