Skip to content

Commit

Permalink
only mp_state has new state send FFP_MSG_PLAYBACK_STATE_CHANGED msg
Browse files Browse the repository at this point in the history
(cherry picked from commit 9716aed2662d7fad6f8383595b05c9ec08ff1b02)
  • Loading branch information
debugly committed Jan 10, 2025
1 parent 7d15b5d commit 1c43bfd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ijkmedia/ijkplayer/ijkplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ const char *ijkmp_version(void)

void ijkmp_change_state_l(IjkMediaPlayer *mp, int new_state)
{
mp->mp_state = new_state;
ffp_notify_msg1(mp->ffplayer, FFP_MSG_PLAYBACK_STATE_CHANGED);
if (mp->mp_state != new_state) {
mp->mp_state = new_state;
ffp_notify_msg1(mp->ffplayer, FFP_MSG_PLAYBACK_STATE_CHANGED);
}
}

IjkMediaPlayer *ijkmp_create(int (*msg_loop)(void*))
Expand Down

0 comments on commit 1c43bfd

Please sign in to comment.