diff --git a/frameworks/native/capi/avcodec/native_video_encoder.cpp b/frameworks/native/capi/avcodec/native_video_encoder.cpp index 11930e886eb0dd5febd9d681e505377176ab8034..e36c9db6e482ba2b2cdbdfd72ee8f33e738f9cac 100644 --- a/frameworks/native/capi/avcodec/native_video_encoder.cpp +++ b/frameworks/native/capi/avcodec/native_video_encoder.cpp @@ -377,7 +377,8 @@ OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream(OH_AVCodec *codec) CHECK_AND_RETURN_RET_LOG(videoEncObj->videoEncoder_ != nullptr, AV_ERR_INVALID_VAL, "Video encoder is nullptr!"); int32_t ret = videoEncObj->videoEncoder_->NotifyEos(); - CHECK_AND_RETURN_RET_LOG(ret == AVCS_ERR_OK, AV_ERR_OPERATE_NOT_PERMIT, "Video encoder notify end of stream failed!"); + CHECK_AND_RETURN_RET_LOG(ret == AVCS_ERR_OK, AV_ERR_OPERATE_NOT_PERMIT, + "Video encoder notify end of stream failed!"); return AV_ERR_OK; } diff --git a/frameworks/native/capi/common/native_object.h b/frameworks/native/capi/common/native_object.h index 6582db39af7f141fcde5300fa432ce0d51bafab1..805fbff6b98ffe796ec1194904105debae74ed3f 100644 --- a/frameworks/native/capi/common/native_object.h +++ b/frameworks/native/capi/common/native_object.h @@ -13,6 +13,9 @@ * limitations under the License. */ +#ifndef NATIVE_OBJECT_H +#define NATIVE_OBJECT_H + #include #include "avsource.h" #include "native_avsource.h" @@ -24,4 +27,6 @@ struct AVSourceObject : public OH_AVSource { ~AVSourceObject() = default; const std::shared_ptr source_; -}; \ No newline at end of file +}; + +#endif // NATIVE_OBJECT_H \ No newline at end of file diff --git a/services/engine/muxer/muxer_engine_impl.cpp b/services/engine/muxer/muxer_engine_impl.cpp index 42820502febec1d0496dbda81721f77ed1dc81a2..7d2edf0dcf7171d4128c4d3d04ad227e0b74c8df 100644 --- a/services/engine/muxer/muxer_engine_impl.cpp +++ b/services/engine/muxer/muxer_engine_impl.cpp @@ -265,7 +265,7 @@ int32_t MuxerEngineImpl::DumpInfo(int32_t fd) std::string("Track_") + std::to_string(mediaDescIdx) + "_Info"); for (auto iter : dumpTable) { dumpControler.AddInfoFromFormat( - DUMP_MUXER_INFO_INDEX + (dumpTrackIndex << 8) + dumpInfoIndex, + DUMP_MUXER_INFO_INDEX + (dumpTrackIndex << DUMP_OFFSET_8) + dumpInfoIndex, mediaDesc, iter.first, iter.second); dumpInfoIndex++; } diff --git a/test/unittest/avcodec_test/native/surface/surface_native_mock.cpp b/test/unittest/avcodec_test/native/surface/surface_native_mock.cpp index d96af8be40e015a6f59e22b4919c8024993964b5..a484b548ad3827b7715de79602ae84dcb5acf77a 100644 --- a/test/unittest/avcodec_test/native/surface/surface_native_mock.cpp +++ b/test/unittest/avcodec_test/native/surface/surface_native_mock.cpp @@ -34,7 +34,7 @@ sptr SurfaceNativeMock::GetSurface() { if (surface_ == nullptr) { sptr option = new Rosen::WindowOption(); - option->SetWindowRect({0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT}); + option->SetWindowRect({ 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT }); option->SetWindowType(Rosen::WindowType::WINDOW_TYPE_APP_LAUNCHING); option->SetWindowMode(Rosen::WindowMode::WINDOW_MODE_FLOATING); window_ = Rosen::Window::Create("avcodec_unittest", option);