bangnoise / ofxHapPlayer

A Hap player for OpenFrameworks
Other
147 stars 46 forks source link

Exception from unique_lock in Demuxer.cpp #64

Closed chriship closed 3 years ago

chriship commented 3 years ago

Hi,

I seem to be getting an intermitent crash which is caused by line 192 in Demuxer.cpp:

std::unique_lock<std::mutex> locker(_lock);

I think it's something to do with audio streams because when I comment out the audio section of foundStream() in ofxHapPlayer.cpp it works fine.

I've noticed my CPU runs at 100% too with the audio code back in.

I'm playing a mix of videos, some with audio, some without. I've looked through and the audio in the videos looks fine I think:

ID                          : 2
Format                      : AAC
Format/Info                 : Advanced Audio Codec
Format profile              : LC
Codec ID                    : 40
Duration                    : 6s 24ms
Duration_LastFrame          : -14ms
Bit rate mode               : Variable
Bit rate                    : 53.5 Kbps
Maximum bit rate            : 128 Kbps
Channel(s)                  : 2 channels
Channel positions           : Front: L R
Sampling rate               : 44.1 KHz
Frame rate                  : 43.066 fps (1024 spf)
Compression mode            : Lossy
Stream size                 : 39.3 KiB (4%)
Language                    : English
Default                     : Yes
Alternate group             : 1

Any ideas?

bangnoise commented 3 years ago

Which platform and OF version? Can you reproduce the crash if you load your file in the example app, or only your own code?

chriship commented 3 years ago

I'm on Windows with OF0.10. It's tricky to test on the example app because I'm loading lots of videos (approx 60) and playing 3 at a time, one after the other. I'll try adding that functionality to the example app and see where I get...

bangnoise commented 3 years ago

I can't spot an obvious problem there - do you know if it's related to any action in particular, such as closing a player?

A project to reproduce the issue would be super helpful.

bangnoise commented 3 years ago

The problem where audio causes high CPU usage should be fixed now - perhaps you could pull and confirm, thanks!

chriship commented 3 years ago

Oh fantastic, I think this has fixed my issue! Thanks so much!