Play HLS stream got error: -12971

Hi,

We're developing player demo to play HLS test stream, sometimes player will be frozen. I found these from log:

2017-12-20 10:06:37.582928+0800 [65718:1756811] player <NLMoviePlayerViewController: 0x7ff02906e000> is playing
2017-12-20 10:06:37.990062+0800 [65718:1757471] [] <<<< FigStreamPlayer >>>> fpfs_BytePumpFn: <0x7ff028144600> Received kFigBytePumpCallback_NewAlternate while track 1 was in state 0, rate 1.000000 - deleting
2017-12-20 10:36:44.096425+0800 [65718:1790731] [] <<<< FigStreamPlayer >>>> fpfs_BytePumpFn: <0x7ff028144600> error -12971 from manifold-substream 0
2017-12-20 10:36:44.125397+0800 [65718:1789747] Task <6F40077F-D463-47C7-9335-141F847A043E>.<1> finished with error - code: -999

Someone know about this error code -12971? I believe it's about HLS.

Any ideas, tips, advice would be greatly appreciated.


Thanks,

Monty

Replies

This is an MPEG-2 TS parser error. It means that the TS segment was incorrect or corrupt in some way.


I have encountered the same error. A stream that had no observable damage was stopping at a certain point. I've found a fix, which is to manually set some value for the currentItem's preffered buffer size:



player.currentItem.preferredForwardBufferDuration = 1


The system wont honor your desire for the buffer size for some reason, but it fixes the bug.

AVPlayerItem doesn't reflect an error and doesn't go the failed state. No error logs either.