Skip to content

Commit a4d0e89

Browse files
committed
[video_player_avplay] Fix type missmatch
fix to below error on tizen 10.0 rootstrap src/plus_player.cc:1366:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *data = strstr(ad_data, prefix); ^ ~~~~~~~~~~~~~~~~~~~~~~~
1 parent b755167 commit a4d0e89

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-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 an assertion issue when getting AD information.
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,13 +1359,13 @@ void PlusPlayer::OnStateChangedToPlaying(void *user_data) {
13591359

13601360
void PlusPlayer::OnADEventFromDash(const char *ad_data, void *user_data) {
13611361
const char *prefix = "AD_INFO: ";
1362-
char *data = strstr(ad_data, prefix);
1362+
const char *data = strstr(ad_data, prefix);
13631363
if (!data) {
13641364
LOG_ERROR("[PlusPlayer] Invalid ad_data.");
13651365
return;
13661366
}
13671367
data += strlen(prefix);
1368-
data[strlen(data) - 1] = '\0';
1368+
const_cast<char *>(data)[strlen(data) - 1] = '\0';
13691369
LOG_INFO("[PlusPlayer] AD info: %s", data);
13701370

13711371
rapidjson::Document doc;

0 commit comments

Comments
 (0)