Limited the Goto() call in cDvbPlayer::SetAudioTrack() to the main thread

This commit is contained in:
Klaus Schmidinger 2013-03-08 13:47:02 +01:00
parent f7645402ff
commit d08777ed87
2 changed files with 6 additions and 2 deletions

View File

@ -7689,7 +7689,7 @@ Video Disk Recorder Revision History
- When sorting recordings by name, folders are now always at the top of the list. - When sorting recordings by name, folders are now always at the top of the list.
- Updated the Russian OSD texts (thanks to Oleg Roitburd). - Updated the Russian OSD texts (thanks to Oleg Roitburd).
2013-03-07: Version 1.7.40 2013-03-08: Version 1.7.40
- The "Recording info" page of the skins that come with VDR now displays the name of - The "Recording info" page of the skins that come with VDR now displays the name of
the channel (if available) from which this recording was taken. the channel (if available) from which this recording was taken.
@ -7722,3 +7722,5 @@ Video Disk Recorder Revision History
With this VDR now supports "multi streaming" on DVB-S2 and DVB-T2 transponders. With this VDR now supports "multi streaming" on DVB-S2 and DVB-T2 transponders.
- Fixed a possible deadlock when changing the audio track while replaying a recording. - Fixed a possible deadlock when changing the audio track while replaying a recording.
- Fixed resuming replay of PES recordings (reported by Oliver Endriss). - Fixed resuming replay of PES recordings (reported by Oliver Endriss).
- Limited the Goto() call in cDvbPlayer::SetAudioTrack() to the main thread, in order
to avoid a crash when the track is automatically set from the player thread.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: dvbplayer.c 2.34 2013/03/07 14:38:26 kls Exp $ * $Id: dvbplayer.c 2.35 2013/03/08 13:44:19 kls Exp $
*/ */
#include "dvbplayer.h" #include "dvbplayer.h"
@ -817,6 +817,8 @@ void cDvbPlayer::Goto(int Index, bool Still)
void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId) void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
{ {
if (!cThread::IsMainThread())
return; // only do this upon user interaction
if (playMode == pmPlay) { if (playMode == pmPlay) {
if (!ptsIndex.IsEmpty()) { if (!ptsIndex.IsEmpty()) {
int Current, Total; int Current, Total;