Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/pxScene2d/src/pxVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ rtError pxVideo::availableAudioLanguages(rtObjectRef& languages) const
rtRef<rtArrayObject> array = new rtArrayObject;
for (int i = 0; i < mPlaybackMetadata.languageCount; i++)
{
array->pushBack(mPlaybackMetadata.languages[i]);
array->pushBack(mPlaybackMetadata.languages.at(i).c_str());
}

languages = array;
Expand Down Expand Up @@ -666,10 +666,10 @@ class MediaMetadataListener : public AAMPEventListener
{
assert(AAMP_EVENT_MEDIA_METADATA == event.type);

mMetadata.languageCount = event.data.metadata.languageCount;
mMetadata.languageCount = event.languages.size();
for (int i = 0; i < mMetadata.languageCount; i++)
{
strncpy(mMetadata.languages[i], event.data.metadata.languages[i], MAX_LANGUAGE_TAG_LENGTH);
mMetadata.languages.push_back(event.languages.at(i));
}

mMetadata.supportedSpeedCount = event.data.metadata.supportedSpeedCount;
Expand Down
2 changes: 1 addition & 1 deletion examples/pxScene2d/src/pxVideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
struct PlaybackMetadata
{
int languageCount; /**< Available language count */
char languages[MAX_LANGUAGE_COUNT][MAX_LANGUAGE_TAG_LENGTH]; /**< Available languages */
std::vector<std::string> languages; /**< Available languages */
int supportedSpeedCount; /**< Supported playback speed count */
int supportedSpeeds[MAX_SUPPORTED_SPEED_COUNT]; /**< Supported playback speeds */
};
Expand Down