兼容一些老的c编译器: #1668

This commit is contained in:
xiongziliang 2022-05-29 21:30:06 +08:00
parent 57d65e47cf
commit 4f05aef245
2 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,8 @@ void API_CALL on_mk_play_event_func(void *user_data, int err_code, const char *e
if (err_code == 0) { if (err_code == 0) {
//success //success
log_debug("play success!"); log_debug("play success!");
for (int i = 0; i < track_count; ++i) { int i;
for (i = 0; i < track_count; ++i) {
if (mk_track_is_video(tracks[i])) { if (mk_track_is_video(tracks[i])) {
log_info("got video track: %s", mk_track_codec_name(tracks[i])); log_info("got video track: %s", mk_track_codec_name(tracks[i]));
ctx->video_decoder = mk_decoder_create(tracks[i], 0); ctx->video_decoder = mk_decoder_create(tracks[i], 0);

View File

@ -90,7 +90,8 @@ void API_CALL on_mk_play_event_func(void *user_data, int err_code, const char *e
//success //success
log_debug("play success!"); log_debug("play success!");
ctx->media = mk_media_create("__defaultVhost__", "live", "test", 0, 0, 0); ctx->media = mk_media_create("__defaultVhost__", "live", "test", 0, 0, 0);
for (int i = 0; i < track_count; ++i) { int i;
for (i = 0; i < track_count; ++i) {
mk_media_init_track(ctx->media, tracks[i]); mk_media_init_track(ctx->media, tracks[i]);
mk_track_add_delegate(tracks[i], on_track_frame_out, user_data); mk_track_add_delegate(tracks[i], on_track_frame_out, user_data);
} }