Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace g_memdup with g_memdup2 #30

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- fix: remove `g_thread_init` (deprecation) ([#26](https://github.com/fofix/python-mixstream/pull/26))
- fix: replace `GStaticMutex` with `GMutex` (deprecation) ([#24](https://github.com/fofix/python-mixstream/pull/24))
- fix: replace `g_memdup` with `g_memdup2` (deprecation) ([#30](https://github.com/fofix/python-mixstream/pull/30))
- fix: replace `g_mutex_free` with `g_mutex_clear` to free resources (deprecation) ([#29](https://github.com/fofix/python-mixstream/pull/29))
- fix: replace `g_mutex_new` with `g_mutex_init` to init a mutex (deprecation) ([#28](https://github.com/fofix/python-mixstream/pull/28))

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MixStream is a C-extension in Python to combine [SoundTouch](https://www.surina.

You'll need those packages:

* `glib` ( > 2.34)
* `glib` (>= 2.68)
* `libogg`
* `libtheora`
* `libvorbisfile`
Expand Down
2 changes: 1 addition & 1 deletion mixstream/MixStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int mix_stream_play(MixStream* stream, int requested_channel)
/* Now we know what channel we're on. Put it into the channel table. */
g_mutex_lock(&chan_table_mutex);
stream->channel = real_channel;
g_hash_table_insert(chan_table, g_memdup(&stream->channel, sizeof(int)), stream);
g_hash_table_insert(chan_table, g_memdup2(&stream->channel, sizeof(int)), stream);
g_mutex_unlock(&chan_table_mutex);

stream->chunk_start_ticks = SDL_GetTicks();
Expand Down