ksvc / KSYMediaPlayer_Android

金山云Android播放SDK(KSYUN Live Streaming player SDK),支持RTMP HTTP-FLV HLS 协议(supporting RTMP HTTP-FLV HLS protocol),直播延时2-3秒(Living delay 2 or 3 seconds),supporting jitter control,software&hardware decode
http://v.ksyun.com/
Apache License 2.0
855 stars 246 forks source link

MediaPlayer getVideoWidth() and getVideoHeight() return 0 #158

Open zaizaixinhtrai opened 7 years ago

zaizaixinhtrai commented 7 years ago

I uesed MediaPlayer for read rtmp file, but sometime getVideoWidth() and getVideoHeight() return 0 and we have black screen, noted still hear the sound of video and not return error code. I'm using KSY 2.3.4 version. Any suggestions hepl me solve that, thanks.

FirmianaRain commented 7 years ago

It seems that something when parsing video stream infos. Do you get the MEDIA_INFO_SUGGEST_RELOAD in onInfo Listener

zaizaixinhtrai commented 7 years ago

Your mean should getVideoWidth() and getVideoHeight() after MEDIA_INFO_SUGGEST_RELOAD is returned