Skip to content

Commit

Permalink
添加单路音频播放器追帧策略
Browse files Browse the repository at this point in the history
  • Loading branch information
tonychanchen committed Aug 4, 2023
1 parent aae866a commit 361f40d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,16 @@ static void check_external_clock_speed(VideoState *is, FFPlayer *ffp) {
set_clock_speed(&is->extclk, EXTERNAL_CLOCK_SPEED_MAX);
}
}else {
ffp_set_playback_rate(ffp, 1);
set_clock_speed(&is->extclk, 1);
if (is->video_stream < 0 && is->audioq.nb_packets > temp_packet_num) {
if (ffp->audio_speed > 1) {
ffp_set_playback_rate(ffp, ffp->audio_speed);
}else {
ffp_set_playback_rate(ffp, EXTERNAL_CLOCK_SPEED_MAX);
}
}else {
ffp_set_playback_rate(ffp, 1);
set_clock_speed(&is->extclk, 1);
}
}
//#endif
}
Expand Down

0 comments on commit 361f40d

Please sign in to comment.