Skip to content

macosx: prevent VLC from crashing after clearing the playlist and then opening a new file

Astrom Cheng requested to merge Astrom/vlc:master into master
  1. After clearing the playlist and then opening a new file, the VLCPlayerController's current media item changes, which posts a VLCPlayerCurrentMediaItemChanged notification.
  2. VLCPlaybackContinuityController receives this notification and calls inputItemChanged:.
  3. This chain of events leads to a VLCInputItem object being deallocated.
  4. The dealloc method in VLCInputItem.m calls input_item_Release(p_item).
  5. The crash occurs because p_item is NULL, and input_item_Release doesn't handle NULL values, leading to a crash when it tries to access memory at an invalid address.

Merge request reports

Loading