Skip to content

[flutter_webrtc_tizen]Upgrade flutter webrtc to 1.4.1#993

Open
xiaowei-guan wants to merge 26 commits intoflutter-tizen:masterfrom
xiaowei-guan:upgrade_webrtc
Open

[flutter_webrtc_tizen]Upgrade flutter webrtc to 1.4.1#993
xiaowei-guan wants to merge 26 commits intoflutter-tizen:masterfrom
xiaowei-guan:upgrade_webrtc

Conversation

@xiaowei-guan
Copy link
Copy Markdown
Contributor

@xiaowei-guan xiaowei-guan commented Apr 15, 2026

Fix #971

  • Upgrade flutter webrtc to 1.4.1

@xiaowei-guan xiaowei-guan marked this pull request as draft April 15, 2026 10:07
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the flutter_webrtc dependency to version 1.3.1 and introduces a TaskRunner interface to facilitate thread-safe event dispatching. New features include setVolume for audio tracks, dataChannelGetBufferedAmount, and configurable RTC logging severity. The refactor propagates the TaskRunner through various observers and managers and updates several WebRTC internal headers. Feedback identifies critical issues including a use-after-free vulnerability in setVolume, the lack of initialization for the task_runner_ member, and a dangling pointer risk with a static global logging proxy. Further improvements are requested regarding the robustness of the maybeFindDouble helper, adherence to C++ casting standards, and the restoration of a check for defined statistics members.

Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc_tizen_plugin.cc
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc
Comment thread packages/flutter_webrtc/tizen/inc/flutter_common.h
Comment thread packages/flutter_webrtc/tizen/src/flutter_data_channel.cc Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_peerconnection.cc
- Update minimum Flutter and Dart version to 3.13 and 3.1
- Fix analyze issue
- Update code format
- Adds compatibility with `http` 1.0 in example
@xiaowei-guan xiaowei-guan changed the title Upgrade flutter webrtc to 1.3.1 Upgrade flutter webrtc to 1.4.1 Apr 24, 2026
@xiaowei-guan xiaowei-guan marked this pull request as ready for review April 24, 2026 11:30
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the flutter_webrtc_tizen plugin to version 0.2.0, increasing the minimum SDK requirements and updating the flutter_webrtc dependency. Key additions include a TaskRunner for thread-safe event dispatching, UTF-8 sanitization for device identifiers, and support for data packet encryption and frame capturing. The implementation also introduces audio volume control, buffered amount retrieval for data channels, and enhanced logging capabilities. Review feedback identifies critical issues in the frame capture logic, specifically a busy-wait loop that blocks the main thread and a memory leak in pixel buffer allocation. Additionally, concerns were raised regarding thread safety for shared flags, the use of volatile for synchronization, and potential crashes due to dangling pointers in the global logging callback.

Comment thread packages/flutter_webrtc/tizen/src/flutter_frame_capturer.cc Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_frame_capturer.cc Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc Outdated
Comment thread packages/flutter_webrtc/CHANGELOG.md Outdated
Comment thread packages/flutter_webrtc/tizen/inc/flutter_common.h
Comment thread packages/flutter_webrtc/tizen/src/flutter_common.cc Outdated
Comment thread packages/flutter_webrtc/tizen/inc/flutter_frame_capturer.h Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_data_packet_cryptor.cc Outdated
Comment thread packages/flutter_webrtc/tizen/src/flutter_peerconnection.cc
@xiaowei-guan xiaowei-guan changed the title Upgrade flutter webrtc to 1.4.1 [flutter webrtc tizen]Upgrade flutter webrtc to 1.4.1 Apr 24, 2026
@xiaowei-guan xiaowei-guan changed the title [flutter webrtc tizen]Upgrade flutter webrtc to 1.4.1 [flutter_webrtc_tizen]Upgrade flutter webrtc to 1.4.1 Apr 24, 2026
1.Fixed the use-after-free vulnerability caused by assigning `scoped_refptr<RTCMediaTrack>`
returned by `MediaTrackForId()` to raw pointers. The temporary `scoped_refptr` was being
destroyed at the end of the assignment statement, potentially deleting the track object
 before it could be used.
change so file Flags to soft
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc
Comment thread packages/flutter_webrtc/tizen/src/flutter_webrtc.cc
Comment thread packages/flutter_webrtc/tizen/src/flutter_frame_capturer.cc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flutter_webrtc_tizen] Upgrade to 1.41

2 participants