Skip to content

Commit 95b1abe

Browse files
committed
ofBaseVideoPlayer load function was reverted incorrectly as its argument used to be a string rather than const reference string. This fixes other video players that were affected by that change.
1 parent f3b9aa6 commit 95b1abe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/openFrameworks/types/ofBaseTypes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool ofBaseVideoPlayer::load(const of::filesystem::path & fileName){
5353
}
5454

5555
//---------------------------------------------------------------------------
56-
bool ofBaseVideoPlayer::load(const std::string & fileName){
56+
bool ofBaseVideoPlayer::load(std::string fileName){
5757
ofLogError("ofBaseVideoPlayer") << " One of the two load functions need to be implemented ";
5858
return false;
5959
}
@@ -64,7 +64,7 @@ void ofBaseVideoPlayer::loadAsync(const of::filesystem::path & fileName){
6464
}
6565

6666
//---------------------------------------------------------------------------
67-
void ofBaseVideoPlayer::loadAsync(const std::string & fileName){
67+
void ofBaseVideoPlayer::loadAsync(std::string fileName){
6868
ofLogWarning("ofBaseVideoPlayer") << "loadAsync() not implemented, loading synchronously";
6969
load(fileName);
7070
}

libs/openFrameworks/video/ofVideoBaseTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{
212212
/// \brief Legacy approach for loading videos for older inherited classes
213213
/// \param name The name of the video resource to load.
214214
/// \return True if the video was loaded successfully.
215-
virtual bool load(const std::string & fileName);
215+
virtual bool load(std::string fileName);
216216

217217
/// \brief Asynchronously load a video resource by name.
218218
///
@@ -228,7 +228,7 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{
228228

229229
/// \brief Legacy approach for Asynchronously load a video resource by name.
230230
/// \param name The name of the video resource to load.
231-
virtual void loadAsync(const std::string & fileName);
231+
virtual void loadAsync(std::string fileName);
232232

233233
/// \brief Play the video from the current playhead position.
234234
///

0 commit comments

Comments
 (0)