mp3 stream stopped when reachability changes
The player's state change to VLCMediaPlayerStateStopped when network reachability changes (Reachable -> Not reachable (for ~ 3 seconds) -> Reachable).
The problem appears in both versions 'MobileVLCKit-unstable', '3.0.0a49' and 'MobileVLCKit-prod' and it seams to happen mainly on iOS 11. (iPhone 7, iOS 11.2.1).
Here are some debug logs that may help.
**1:**
2017-12-18 16:07:40.424068-0500 [1140:318362] Reachability: Not Reachable
2017-12-18 16:07:43.200293-0500 [1140:318362] Reachability: Reachable via WiFi
2017-12-18 16:07:45.926317-0500 [1140:324316] resampling stopped (drift: -7714 us)
2017-12-18 16:08:11.689687-0500 [1140:324316] playback too early (-80006): down-sampling
2017-12-18 16:08:12.571998-0500 [1140:324316] playback way too early (-135990): playing silence
2017-12-18 16:08:12.572128-0500 [1140:324316] inserting 5997 zeroes
2017-12-18 16:08:12.807296-0500 [1140:324316] playback too late (64610): up-sampling
2017-12-18 16:08:12.939126-0500 [1140:324316] resampling stopped (drift: 25581 us)
2017-12-18 16:08:13.065703-0500 [1140:324316] playback too late (66806): up-sampling
2017-12-18 16:08:13.197314-0500 [1140:324316] resampling stopped (drift: 27581 us)
2017-12-18 16:08:13.328853-0500 [1140:324316] playback too late (73808): up-sampling
2017-12-18 16:08:13.461244-0500 [1140:324316] resampling stopped (drift: 34506 us)
2017-12-18 16:08:13.588603-0500 [1140:324316] playback too late (77303): up-sampling
2017-12-18 16:08:17.400737-0500 [1140:324301] EOF reached
2017-12-18 16:08:17.430354-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:17.534220-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:17.639605-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:17.744713-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:17.846765-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:17.949278-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.051960-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.156792-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.258001-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.363245-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.470389-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.575032-0500 [1140:324301] waiting decoder fifos to empty
2017-12-18 16:08:18.678147-0500 [1140:324301] killing decoder fourcc `mpga', 0 PES in FIFO
2017-12-18 16:08:18.678222-0500 [1140:324301] removing module "mpg123"
2017-12-18 16:08:18.678287-0500 [1140:324301] removing module "ugly"
2017-12-18 16:08:18.678314-0500 [1140:324301] removing module "scaletempo"
2017-12-18 16:08:18.678499-0500 [1140:324301] removing module "trivial"
2017-12-18 16:08:23.429462-0500 [1140:318362] [APP_LOG] Audio center notify state changed VLCMediaPlayerStateStopped
2017-12-18 16:08:23.537471-0500 [1140:324301] removing module "float_mixer"
2017-12-18 16:08:23.537587-0500 [1140:324301] keeping audio output
2017-12-18 16:08:23.537665-0500 [1140:324301] removing module "es"
2017-12-18 16:08:23.537715-0500 [1140:324301] removing module "mpeg_audio"
2017-12-18 16:08:23.537775-0500 [1140:324301] removing module "record"
2017-12-18 16:08:23.537821-0500 [1140:324301] removing module "cache_read"
2017-12-18 16:08:23.569023-0500 [1140:324301] removing module "http"
2017-12-18 16:08:23.569189-0500 [1140:324301] Program doesn't contain anymore ES
**2:**
2017-12-18 16:32:21.232502-0500 [1207:339350] Reachability: Not Reachable
2017-12-18 16:32:21.330524-0500 [1207:342259] [] nw_socket_service_writes_block_invoke sendmsg(fd 9, 31 bytes): [49] Can't assign requested address
2017-12-18 16:32:21.349521-0500 [1207:342259] TIC Read Status [25:0x0]: 1:49
2017-12-18 16:32:21.349593-0500 [1207:342259] TIC Read Status [25:0x0]: 1:49
2017-12-18 16:32:23.569901-0500 [1207:341085] resampling stopped (drift: -16417 us)
2017-12-18 16:32:24.225983-0500 [1207:339350] Reachability: Reachable via WiFi
2017-12-18 16:32:35.246441-0500 [1207:341045] EOF reached
2017-12-18 16:32:35.271230-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.376351-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.490443-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.595649-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.699937-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.804883-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:35.910214-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:36.015902-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:36.120438-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:36.222320-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:36.327566-0500 [1207:341045] waiting decoder fifos to empty
2017-12-18 16:32:36.430000-0500 [1207:341045] killing decoder fourcc `mpga', 0 PES in FIFO
2017-12-18 16:32:36.430210-0500 [1207:341045] removing module "mpg123"
2017-12-18 16:32:36.437785-0500 [1207:341045] removing module "ugly"
2017-12-18 16:32:36.437970-0500 [1207:341045] removing module "scaletempo"
2017-12-18 16:32:36.438123-0500 [1207:341045] removing module "trivial"
2017-12-18 16:32:36.438577-0500 [1207:339350] [APP_LOG] Audio center notify state changed VLCMediaPlayerStateStopped
2017-12-18 16:32:36.577093-0500 [1207:341045] removing module "float_mixer"
2017-12-18 16:32:36.577438-0500 [1207:341045] keeping audio output
2017-12-18 16:32:36.577537-0500 [1207:341045] removing module "es"
2017-12-18 16:32:36.577570-0500 [1207:341045] removing module "mpeg_audio"
2017-12-18 16:32:36.577609-0500 [1207:341045] removing module "record"
2017-12-18 16:32:36.577636-0500 [1207:341045] removing module "cache_read"
2017-12-18 16:32:36.577791-0500 [1207:341045] removing module "http"
2017-12-18 16:32:36.577873-0500 [1207:341045] Program doesn't contain anymore ES
**3:**
2017-12-18 16:36:36.540268-0500 [1240:346785] Reachability: Reachable via WiFi
2017-12-18 16:36:37.384202-0500 [1240:347203] resampling stopped (drift: -17393 us)
2017-12-18 16:36:41.702939-0500 [1240:346879] [WC] already in progress or activated
2017-12-18 16:36:42.328508-0500 [1240:346785] [] <<<< AVOutputDeviceDiscoverySession (FigRouteDiscoverer) >>>> -[AVFigRouteDiscovererOutputDeviceDiscoverySessionImpl outputDeviceDiscoverySessionDidChangeDiscoveryMode:]: Setting device discovery mode to DiscoveryMode_None (client: )
2017-12-18 16:36:43.291378-0500 [1240:347203] playback too early (-84251): down-sampling
2017-12-18 16:36:43.912897-0500 [1240:347203] playback way too early (-145386): playing silence
2017-12-18 16:36:43.912974-0500 [1240:347203] inserting 6411 zeroes
2017-12-18 16:36:44.570338-0500 [1240:347203] playback too late (60060): up-sampling
2017-12-18 16:36:55.828508-0500 [1240:347203] resampling stopped (drift: 25638 us)
2017-12-18 16:38:36.557257-0500 [1240:347203] playback too early (-45163): down-sampling
2017-12-18 16:38:36.685409-0500 [1240:347203] playback too late (82989): up-sampling
2017-12-18 16:38:36.685570-0500 [1240:347203] resampling stopped (drift: 83166 us)
2017-12-18 16:38:36.815816-0500 [1240:347203] playback too late (106725): up-sampling
2017-12-18 16:38:45.969265-0500 [1240:346785] Reachability: Not Reachable
2017-12-18 16:38:48.918827-0500 [1240:346785] Reachability: Reachable via WiFi
2017-12-18 16:38:52.932790-0500 [1240:347203] resampling stopped (drift: -3060 us)
2017-12-18 16:38:54.736475-0500 [1240:347203] playback too early (-98152): down-sampling
2017-12-18 16:38:54.867375-0500 [1240:347203] playback way too early (-137936): playing silence
2017-12-18 16:38:54.867492-0500 [1240:347203] inserting 6082 zeroes
2017-12-18 16:38:55.362209-0500 [1240:347203] playback too late (68056): up-sampling
2017-12-18 16:38:55.493259-0500 [1240:347203] resampling stopped (drift: 28239 us)
2017-12-18 16:38:55.623514-0500 [1240:347203] playback too late (73129): up-sampling
2017-12-18 16:38:55.753580-0500 [1240:347203] resampling stopped (drift: 32349 us)
2017-12-18 16:38:56.642432-0500 [1240:347203] playback too late (67786): up-sampling
2017-12-18 16:38:56.773222-0500 [1240:347203] resampling stopped (drift: 27695 us)
2017-12-18 16:38:56.905184-0500 [1240:347203] playback too late (74310): up-sampling
2017-12-18 16:38:56.907201-0500 [1240:347203] resampling stopped (drift: -8978 us)
2017-12-18 16:38:57.924811-0500 [1240:347203] playback too late (69842): up-sampling
2017-12-18 16:38:58.057475-0500 [1240:347203] resampling stopped (drift: 31648 us)
2017-12-18 16:38:59.202736-0500 [1240:347203] playback too late (67495): up-sampling
2017-12-18 16:39:00.747907-0500 [1240:347203] resampling stopped (drift: -10077 us)
2017-12-18 16:39:01.761852-0500 [1240:347203] playback too late (65139): up-sampling
2017-12-18 16:39:01.893377-0500 [1240:347203] resampling stopped (drift: 25798 us)
2017-12-18 16:39:03.043447-0500 [1240:347203] playback too late (66478): up-sampling
2017-12-18 16:39:03.172708-0500 [1240:347203] resampling stopped (drift: 24870 us)
2017-12-18 16:39:04.323268-0500 [1240:347203] playback too late (66036): up-sampling
2017-12-18 16:39:04.455013-0500 [1240:347203] resampling stopped (drift: 26930 us)
2017-12-18 16:39:05.606395-0500 [1240:347203] playback too late (68916): up-sampling
2017-12-18 16:39:05.734122-0500 [1240:347203] resampling stopped (drift: 25823 us)
2017-12-18 16:39:06.883194-0500 [1240:347203] playback too late (65503): up-sampling
2017-12-18 16:39:07.014744-0500 [1240:347203] resampling stopped (drift: 26166 us)
2017-12-18 16:39:08.163110-0500 [1240:347203] playback too late (65197): up-sampling
2017-12-18 16:39:08.293092-0500 [1240:347203] resampling stopped (drift: 24288 us)
2017-12-18 16:39:09.441491-0500 [1240:347203] playback too late (63304): up-sampling
2017-12-18 16:39:09.574835-0500 [1240:347203] resampling stopped (drift: 25780 us)
2017-12-18 16:39:10.722632-0500 [1240:347203] playback too late (64204): up-sampling
2017-12-18 16:39:10.856530-0500 [1240:347203] resampling stopped (drift: 27279 us)
2017-12-18 16:39:12.003040-0500 [1240:347203] playback too late (64387): up-sampling
2017-12-18 16:39:12.137682-0500 [1240:347203] resampling stopped (drift: 28175 us)
2017-12-18 16:39:12.890157-0500 [1240:347164] EOF reached
2017-12-18 16:39:12.919014-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.028502-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.131919-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.237368-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.342047-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.447471-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.554009-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.656960-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.759510-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.862321-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:13.964342-0500 [1240:347164] waiting decoder fifos to empty
2017-12-18 16:39:14.068323-0500 [1240:347164] killing decoder fourcc `mpga', 0 PES in FIFO
2017-12-18 16:39:14.068475-0500 [1240:347164] removing module "mpg123"
2017-12-18 16:39:14.068630-0500 [1240:347164] removing module "ugly"
2017-12-18 16:39:14.068710-0500 [1240:347164] removing module "scaletempo"
2017-12-18 16:39:14.068798-0500 [1240:347164] removing module "trivial"
2017-12-18 16:39:14.073058-0500 [1240:346785] [APP_LOG] Audio center notify state changed VLCMediaPlayerStateStopped
2017-12-18 16:39:14.297070-0500 [1240:347164] removing module "float_mixer"
2017-12-18 16:39:14.302515-0500 [1240:347164] keeping audio output
2017-12-18 16:39:14.303481-0500 [1240:347164] removing module "es"
2017-12-18 16:39:14.305072-0500 [1240:347164] removing module "mpeg_audio"
2017-12-18 16:39:14.305800-0500 [1240:347164] removing module "record"
2017-12-18 16:39:14.306147-0500 [1240:347164] removing module "cache_read"
2017-12-18 16:39:14.306617-0500 [1240:347164] removing module "http"
2017-12-18 16:39:14.306881-0500 [1240:347164] Program doesn't contain anymore ES
---- There's another case thats stop the stream, and maybe it's linked with this : when switching from wifi to LTE, but I don't have log for this one.