diff --git a/AppScope/app.json5 b/AppScope/app.json5 index e708b28043ea2f36d9e24b5199c9b941dfc6aaa1..a442682aed4bbc77f19808107605767dca0d117c 100644 --- a/AppScope/app.json5 +++ b/AppScope/app.json5 @@ -3,7 +3,7 @@ "bundleName": "com.example.mp4parser", "vendor": "example", "versionCode": 1000000, - "versionName": "2.0.3", + "versionName": "2.0.4", "icon": "$media:app_icon", "label": "$string:app_name", "distributedNotificationEnabled": true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c3cc8d361ef3bff1f8c38fd415684b66831b09a..1de661fbbeb359e5d9e8e084ea0f78c2d99afd46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.4 + +- 修复执行ffmpeg命令崩溃的问题 + ## 2.0.3 - 更新版本号至2.0.3 diff --git a/doc/FFmpeg_n4.2.5/HPKBUILD b/doc/FFmpeg_n4.2.5/HPKBUILD index 0d2399521350d8084bff51725cf9d70c9ad9bda9..a8ae0ec52d52599e40e9d995232f953b0cd6ac50 100644 --- a/doc/FFmpeg_n4.2.5/HPKBUILD +++ b/doc/FFmpeg_n4.2.5/HPKBUILD @@ -64,7 +64,7 @@ build() { cd $builddir-$ARCH-build PKG_CONFIG_LIBDIR="${pkgconfigpath}" ./configure "$@" --enable-neon --enable-asm --enable-network \ --enable-cross-compile --enable-librtmp --disable-x86asm --enable-openssl --enable-protocols \ - --enable-static --enable-shared --disable-doc --disable-htmlpages --target-os=linux --arch=$arch \ + --enable-static --disable-shared --disable-doc --disable-htmlpages --target-os=linux --arch=$arch \ --cc=${CC} --ld=${CC} --strip=${STRIP} --host-cc="${CC}" --host-ld="${CC}" --host-os=linux \ --host-ldflags=${ldflags} --sysroot=${OHOS_SDK}/native/sysroot > $buildlog 2>&1 $MAKE >> $buildlog 2>&1 diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 1387e5d1564bda10f855ef049b302b486c4144d1..879b7200428203be690bb91c5fe281f378adc25e 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -4,8 +4,8 @@ "name": "entry", "description": "一个读取、写入操作音视频文件编辑的工具。", "repository": {}, - "version": "2.0.3-rc.0", + "version": "2.0.3-rc.1", "dependencies": { - "@ohos/mp4parser": "2.0.3-rc.0" + "@ohos/mp4parser": "2.0.3-rc.1" } } diff --git a/entry/src/main/ets/pages/getFrameFromVideo.ets b/entry/src/main/ets/pages/getFrameFromVideo.ets index 5cdf8889243d28da603d7916aeecb0d34ba9b637..558d8c26a385492f4af59fc871940e5a1a017198 100644 --- a/entry/src/main/ets/pages/getFrameFromVideo.ets +++ b/entry/src/main/ets/pages/getFrameFromVideo.ets @@ -20,7 +20,7 @@ import hilog from '@ohos.hilog'; @Entry @Component struct GetFrameFromVideo { - @State imagePixelMap?: PixelMap = undefined + @State imagePixelMap?: PixelMap = undefined; private bufferForVideoFrameRetrieval: ArrayBuffer = new ArrayBuffer(0); build() { diff --git a/library/oh-package.json5 b/library/oh-package.json5 index 1383a911f794a8a2f5faac0d5d9e15467f608ff6..c301dcd360a41778d28fb16bc9fd252e1b31d4ce 100644 --- a/library/oh-package.json5 +++ b/library/oh-package.json5 @@ -12,7 +12,7 @@ "description": "一个读取、写入操作音视频文件编辑的工具。支持视频裁剪、视频合成、音频裁剪、音频合成、视频取帧。", "main": "index.ets", "repository": "https://gitee.com/openharmony-tpc/mp4parser", - "version": "2.0.3", + "version": "2.0.4", "tags": [ "mp4parser", "Media" diff --git a/library/src/main/cpp/napi/mp4parser_napi.cpp b/library/src/main/cpp/napi/mp4parser_napi.cpp index 509b8a133edc0896e0d22a99b882a76e544a08ff..e50b5f6b2fa57b3e19fbae3bbbe0d070c1afbc95 100644 --- a/library/src/main/cpp/napi/mp4parser_napi.cpp +++ b/library/src/main/cpp/napi/mp4parser_napi.cpp @@ -40,6 +40,7 @@ int FFMPEG_CMD_NUM = 0; char **exeArgvCmd; State *state = NULL; const int DEFAULT_ZERO = 0; +const int SLEEP_TIME = 10000; const int32_t INDEX_0 = 0; const int32_t INDEX_1 = 1; const int32_t INDEX_2 = 2; @@ -188,6 +189,7 @@ static napi_value exeFFmpegCmd(napi_env env, napi_callback_info info) if (FFMPEG_HANDLE_RESULT != -1) { break; } + usleep(SLEEP_TIME); } }, [](napi_env env, napi_status status, void *data) { diff --git a/oh-package.json5 b/oh-package.json5 index ac7d8c6fd6eeac2bf8d8e2b9c28e1a420501be6b..9ae159c928353c5dd3728613d9171eba1c125fcf 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -11,6 +11,6 @@ "name": "mp4parser", "description": "一个读取、写入操作音视频文件编辑的工具。", "repository": {}, - "version": "2.0.3", + "version": "2.0.4", "dependencies": {} }