Green screen when using mobile VLC to play rtsp streaming on iOS -


i have player on ios based on vlc via mobilevlckit.framework.

when executing , playing h264 rtsp stream, iphone show video correctly. however, in beginning few seconds, there green screen shown. think reason i-frame has not arrived, , yuv=000 mapped green color in rgb.

could add option or operation force player play after receiving i-frame? or there other method avoid green screen problem?

here code

- (instancetype)initwithframe:(cgrect)frame {     self = [super init];     if (self) {         self.player =  [[vlcmediaplayer alloc] init];         self.player.delegate = self;         self.player.media = [vlcmedia mediawithurl:[nsurl urlwithstring:@"rtsp://...."]];         self.player.drawable = self.contentview;     }      return self; }  - (void)play {      if (self.player && !self.player.isplaying) {          [slef.player play];      } } 

any reply appreciated. thanks!

actually, modification should in function static picture_t *decodevideo( decoder_t *p_dec, block_t **pp_block ) of /modules/codec/avcodec/video.c.

add following code in beginning of decodevideo() function skip non-i frame green screen problem can solved.

if (p_sys->b_first_frame && b_gotpicture) {     if (av_picture_type_i != frame->pict_type) {         av_frame_unref(frame);         break;     } } 

and then, build mobilevlckit.framework myself.