[mythtv-commits] mythtv commit: r20972 by markk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Tue Jul 21 02:32:04 UTC 2009


      Author: markk
        Date: 2009-07-21 02:32:03 +0000 (Tue, 21 Jul 2009)
New Revision: 20972
   Changeset: http://cvs.mythtv.org/trac/changeset/20972

Modified:

   trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
   trunk/mythtv/libs/libmythtv/NuppelVideoPlayer.h

Log:

Add some locking around audioOutput in NuppelVideoPlayer to prevent segmentation faults on audio stream changes.

When the audio stream changes, re-initialisation is triggered from the decoder thread (in AVFormatDecoder) but the AudioOutput object may still be accessed via the playback thread - with the obvious results. Crashes usually seen on stream changes in DVD menus.

This fix adds 'minimal' locking around audioOutput in those NVP functions used by the playback thread. Further locking disrupts playback considerably, notably in GetAudioBufferStatus and AddAudioData, but these are only accessed by the decoder thread and hence should not be an issue (as the decoder thread is the only thread to trigger re-initialisation).

Testing with extra debugging on 3 systems showed that thread contention only occurred at the expected places (i.e. during stream changes) - with none seen during normal playback conditions.





More information about the mythtv-commits mailing list