Infinite loop when stopping a fMP4 streaming on a slow network

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Jimmychaohc
New Cone
New Cone
Posts: 2
Joined: 11 Jan 2017 20:34

Infinite loop when stopping a fMP4 streaming on a slow network

Postby Jimmychaohc » 09 Jan 2018 01:25

Reproduction Steps:
1. Start a fMP4 stream
2. Throttle network so the player goes into a frequent buffering state
3. Stop player

Expected Result:
Player stops

Actual Result:
Player hangs, CPU goes to 100% and I need to force terminate the application.

I've tested this on VLC for MacOS and iOS.

It seems like the issue is with FragDemuxTrack() method in /modules/demux/mp4/mp4.c
I don't know enough about VLC to determine exactly what is the problem, but from what I can tell, under normal circumstances the code goes through the entire method no problem and exits at the end with "return VLC_DEMUXER_SUCCESS;".

But when there is latency and stop is pressed on the player, the code goes into the conditional statement "if( i_read < len || p_block == NULL )" of the function "FragDemuxTrack()" and breaks out with "return VLC_DEMUXER_EOF;"

This returns to the calling method DemuxMoof() which is currently in an infinite for loop for( ;; ) until it breaks. Since FragDemuxTrack() returned early without incrementing the "p_track->context.runs.i_current" the loop never ends.

Do we know if there exist a ticket on this somewhere or should I create a bug? Thanks!

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Infinite loop when stopping a fMP4 streaming on a slow network

Postby InTheWings » 09 Jan 2018 09:42

should be fixed from tomorrow's build
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 51 guests