mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
回调可以设置空指针
This commit is contained in:
parent
7272f01ea9
commit
aa9bd56c5a
@ -178,7 +178,7 @@ API_EXPORT void API_CALL mk_player_seekto(mk_player ctx, float progress) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void mk_player_set_on_event(mk_player ctx, on_mk_play_event cb, void *user_data, int type) {
|
static void mk_player_set_on_event(mk_player ctx, on_mk_play_event cb, void *user_data, int type) {
|
||||||
assert(ctx && cb);
|
assert(ctx);
|
||||||
MediaPlayerForC &obj = **((MediaPlayerForC::Ptr *)ctx);
|
MediaPlayerForC &obj = **((MediaPlayerForC::Ptr *)ctx);
|
||||||
obj.setOnEvent(cb,user_data, type);
|
obj.setOnEvent(cb,user_data, type);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ API_EXPORT void API_CALL mk_player_set_on_shutdown(mk_player ctx, on_mk_play_eve
|
|||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT void API_CALL mk_player_set_on_data(mk_player ctx, on_mk_play_data cb, void *user_data) {
|
API_EXPORT void API_CALL mk_player_set_on_data(mk_player ctx, on_mk_play_data cb, void *user_data) {
|
||||||
assert(ctx && cb);
|
assert(ctx);
|
||||||
MediaPlayerForC &obj = **((MediaPlayerForC::Ptr *)ctx);
|
MediaPlayerForC &obj = **((MediaPlayerForC::Ptr *)ctx);
|
||||||
obj.setOnData(cb,user_data);
|
obj.setOnData(cb,user_data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user