From 4f05aef245ca7c78f73698b0f0282bad69416be4 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 29 May 2022 21:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=85=BC=E5=AE=B9=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E8=80=81=E7=9A=84c=E7=BC=96=E8=AF=91=E5=99=A8:=20#1668?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/tests/player_opencv.c | 3 ++- api/tests/pusher.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/tests/player_opencv.c b/api/tests/player_opencv.c index 99a5dade..1d18faa3 100644 --- a/api/tests/player_opencv.c +++ b/api/tests/player_opencv.c @@ -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) { //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])) { log_info("got video track: %s", mk_track_codec_name(tracks[i])); ctx->video_decoder = mk_decoder_create(tracks[i], 0); diff --git a/api/tests/pusher.c b/api/tests/pusher.c index cbcd3c8f..08c7661e 100644 --- a/api/tests/pusher.c +++ b/api/tests/pusher.c @@ -90,7 +90,8 @@ void API_CALL on_mk_play_event_func(void *user_data, int err_code, const char *e //success log_debug("play success!"); 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_track_add_delegate(tracks[i], on_track_frame_out, user_data); }