joshbarrass / deadbeef_GSFdecoder

GSF Decoder plugin for the DeaDBeeF media player, based on viogsf/VBA-M
GNU General Public License v2.0
4 stars 0 forks source link

Segfault when converting a track if the plugin has already initialised #2

Closed joshbarrass closed 2 years ago

joshbarrass commented 2 years ago

Steps to reproduce: 1) Add one or more GSF files to the playlist 2) Begin playing one of the GSF files 3) Right click on a GSF file in the playlist and select convert 4) Click OK to convert

Expected behaviour:

Actual behaviour:

Workaround:

joshbarrass commented 2 years ago

This issue most likely comes about as DeaDBeeF attempts to continue playing the current file whilst converting the requested file. This causes the GSF plugin to be reinitialised. Since the plugin uses a global state object, this would cause the state for the currently playing file to be lost, and the segfault probably occurs whenever the DeaDBeeF tries to do something with that file (e.g. calling the read method). Solving #3 should therefore fix this issue.