1 | Index: libs/libmythtv/NuppelVideoPlayer.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- libs/libmythtv/NuppelVideoPlayer.cpp (revision 9772)
|
---|
4 | +++ libs/libmythtv/NuppelVideoPlayer.cpp (working copy)
|
---|
5 | @@ -328,6 +328,7 @@
|
---|
6 |
|
---|
7 | void NuppelVideoPlayer::SetWatchingRecording(bool mode)
|
---|
8 | {
|
---|
9 | + QMutexLocker locker(&decoder_change_lock);
|
---|
10 | watchingrecording = mode;
|
---|
11 | if (GetDecoder())
|
---|
12 | GetDecoder()->setWatchingRecording(mode);
|
---|
13 | @@ -5857,6 +5858,12 @@
|
---|
14 | void NuppelVideoPlayer::SetDecoder(DecoderBase *dec)
|
---|
15 | {
|
---|
16 | //VERBOSE(VB_IMPORTANT, "SetDecoder("<<dec<<") was "<<decoder);
|
---|
17 | + if (decoder_change_lock.locked())
|
---|
18 | + {
|
---|
19 | + fprintf(stderr, "*****SetDecoder - decoder is in use!!!\n");
|
---|
20 | + }
|
---|
21 | + QMutexLocker locker(&decoder_change_lock);
|
---|
22 | +
|
---|
23 | if (!decoder)
|
---|
24 | decoder = dec;
|
---|
25 | else
|
---|
26 | Index: libs/libmythtv/NuppelVideoPlayer.h
|
---|
27 | ===================================================================
|
---|
28 | --- libs/libmythtv/NuppelVideoPlayer.h (revision 9772)
|
---|
29 | +++ libs/libmythtv/NuppelVideoPlayer.h (working copy)
|
---|
30 | @@ -489,6 +489,7 @@
|
---|
31 | VideoOutputType forceVideoOutput;
|
---|
32 |
|
---|
33 | DecoderBase *decoder;
|
---|
34 | + QMutex decoder_change_lock;
|
---|
35 | VideoOutput *videoOutput;
|
---|
36 | RemoteEncoder *nvr_enc;
|
---|
37 | ProgramInfo *m_playbackinfo;
|
---|
38 | Index: libs/libmythtv/decoderbase.cpp
|
---|
39 | ===================================================================
|
---|
40 | --- libs/libmythtv/decoderbase.cpp (revision 9772)
|
---|
41 | +++ libs/libmythtv/decoderbase.cpp (working copy)
|
---|
42 | @@ -281,6 +281,7 @@
|
---|
43 | VERBOSE(VB_PLAYBACK, "Resyncing position map. posmapStarted = "
|
---|
44 | << (int) posmapStarted << " livetv(" << livetv << ") "
|
---|
45 | << "watchingRec(" << watchingrecording << ")");
|
---|
46 | + sleep(5);
|
---|
47 |
|
---|
48 | unsigned int old_posmap_size = m_positionMap.size();
|
---|
49 |
|
---|