BtbN / vlc-htsp-plugin

Plugin for VLC to access TVHeadend via HTSP.
GNU Lesser General Public License v2.1
58 stars 32 forks source link

Wait on queue condition #8

Closed swegener closed 10 years ago

swegener commented 10 years ago

Commit 9f0441a ("Move sending pause/seek requests into the thread to avoid problems") dropped the vlc_cond_wait() call, resulting in a busy loop when waiting for new messages.

Signed-off-by: Sven Wegener sven.wegener@stealer.net

BtbN commented 10 years ago

Are you sure this won't cause accidential EOF, if no new message has been received yet(keep in mind condvars are affected by spurious wakeups)?

BtbN commented 10 years ago

Yeah, change that EOF back to OK, if the stream ends an invalid message is inserted into the queue, which is checked for later. Checking the convar is right, i missed that.

swegener commented 10 years ago

I've updated the patch.

BtbN commented 10 years ago

Allright, thank you. I guess that is where the strange high cpu usage in another part of VLC came from? I haven't found time to search for that yet, thank you very much.

swegener commented 10 years ago

Yep, the high cpu usage is what caught my attention.