Feature: change 0 to null

pull/221/head
xufuji456 2 years ago
parent 1a1379827f
commit c97ea1701a
  1. 2
      app/src/main/cpp/video_filter.c
  2. 2
      app/src/main/cpp/video_player.cpp

@ -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,

@ -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);

Loading…
Cancel
Save