Skip to content

Commit 7d0b876

Browse files
authored
[video_player_avplay] Fix type missmatch (#912)
1 parent b755167 commit 7d0b876

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

packages/video_player_avplay/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.7.2
2+
* Fix type missmatch.
3+
14
## 0.7.1
25
* Fix an assertion issue when getting AD information.
36

packages/video_player_avplay/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To use this package, add `video_player_avplay` as a dependency in your `pubspec.
1212

1313
```yaml
1414
dependencies:
15-
video_player_avplay: ^0.7.1
15+
video_player_avplay: ^0.7.2
1616
```
1717
1818
Then you can import `video_player_avplay` in your Dart code:

packages/video_player_avplay/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_avplay
22
description: Flutter plugin for displaying inline video on Tizen TV devices.
33
homepage: https://github.com/flutter-tizen/plugins
44
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/video_player_avplay
5-
version: 0.7.1
5+
version: 0.7.2
66

77
environment:
88
sdk: ">=3.1.0 <4.0.0"

packages/video_player_avplay/tizen/src/plus_player.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,14 +1358,19 @@ void PlusPlayer::OnStateChangedToPlaying(void *user_data) {
13581358
}
13591359

13601360
void PlusPlayer::OnADEventFromDash(const char *ad_data, void *user_data) {
1361+
if (!ad_data) {
1362+
LOG_ERROR("[PlusPlayer] No ad_data.");
1363+
return;
1364+
}
1365+
13611366
const char *prefix = "AD_INFO: ";
1362-
char *data = strstr(ad_data, prefix);
1367+
const char *data = strstr(ad_data, prefix);
13631368
if (!data) {
13641369
LOG_ERROR("[PlusPlayer] Invalid ad_data.");
13651370
return;
13661371
}
13671372
data += strlen(prefix);
1368-
data[strlen(data) - 1] = '\0';
1373+
const_cast<char *>(data)[strlen(data) - 1] = '\0';
13691374
LOG_INFO("[PlusPlayer] AD info: %s", data);
13701375

13711376
rapidjson::Document doc;

0 commit comments

Comments
 (0)