Skip to content

Commit

Permalink
Update IjkVideoView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
FongMi committed May 18, 2023
1 parent bd3a436 commit f94b2ef
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ public int getCurrentPosition() {
public void seekTo(int positionMs) {
if (!isInPlaybackState()) return;
onInfo(mPlayer, IMediaPlayer.MEDIA_INFO_BUFFERING_START, 0);
Log.e("DDD", "SEEKTO");
mPlayer.seekTo(positionMs);
mStartPosition = 0;
}
Expand Down Expand Up @@ -481,8 +482,8 @@ public void onBufferingUpdate(IMediaPlayer mp, long position) {

@Override
public void onVideoSizeChanged(IMediaPlayer mp, int width, int height, int sar_num, int sar_den) {
mVideoWidth = width;
mVideoHeight = height;
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
if (mVideoWidth != 0 && mVideoHeight != 0 && mRenderView != null) {
mRenderView.setVideoSize(mVideoWidth, mVideoHeight);
mRenderView.setVideoSampleAspectRatio(sar_num, sar_den);
Expand Down

0 comments on commit f94b2ef

Please sign in to comment.