Skip to content

Commit

Permalink
fix: replace g_memdup with g_memdup2
Browse files Browse the repository at this point in the history
`g_memdup` is deprecated.

Ref fofix#25
  • Loading branch information
Linkid committed Mar 21, 2022
1 parent 2a7c310 commit f9dc012
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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

0 comments on commit f9dc012

Please sign in to comment.