mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Implemented handling DVB subtitles
This commit is contained in:
13
recording.c
13
recording.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 1.154 2007/06/17 13:10:12 kls Exp $
|
||||
* $Id: recording.c 1.155 2007/10/12 14:48:20 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@@ -296,6 +296,17 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
|
||||
strn0cpy(Component->language, s, sizeof(Component->language));
|
||||
}
|
||||
}
|
||||
// The same applies to subtitles:
|
||||
for (int i = 0; i < MAXSPIDS; i++) {
|
||||
const char *s = Channel->Slang(i);
|
||||
if (*s) {
|
||||
tComponent *Component = Components->GetComponent(i, 3, 3);
|
||||
if (!Component)
|
||||
Components->SetComponent(Components->NumComponents(), 3, 3, s, NULL);
|
||||
else if (strlen(s) > strlen(Component->language))
|
||||
strn0cpy(Component->language, s, sizeof(Component->language));
|
||||
}
|
||||
}
|
||||
if (Components != event->Components())
|
||||
((cEvent *)event)->SetComponents(Components);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user