mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 23:43:00 +02:00
libeplayer3: initial attempt to unbreak ass/ssa subtitles
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
#ifdef SUBTITLE_MGR_DEBUG
|
||||
|
||||
static short debug_level = 0;
|
||||
static short debug_level = 20;
|
||||
|
||||
#define subtitle_mgr_printf(level, x...) do { \
|
||||
if (debug_level >= level) printf(x); } while (0)
|
||||
@@ -179,7 +179,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
break;
|
||||
}
|
||||
case MANAGER_LIST: {
|
||||
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||
container_ffmpeg_update_tracks(context, context->playback->uri, 0);
|
||||
*((char***)argument) = (char **)ManagerList(context);
|
||||
break;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
break;
|
||||
}
|
||||
case MANAGER_GET_TRACK: {
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", FILENAME, __FUNCTION__);
|
||||
//subtitle_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", FILENAME, __FUNCTION__);
|
||||
|
||||
if ((TrackCount > 0) && (CurrentTrack >=0))
|
||||
{
|
||||
@@ -220,15 +220,16 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
||||
break;
|
||||
}
|
||||
case MANAGER_SET: {
|
||||
int id = *((int*)argument);
|
||||
int i;
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_SET id=%d\n", FILENAME, __FUNCTION__, *((int*)argument));
|
||||
|
||||
subtitle_mgr_printf(20, "%s::%s MANAGER_SET id=%d\n", FILENAME, __FUNCTION__, id);
|
||||
|
||||
if (id < TrackCount)
|
||||
CurrentTrack = id;
|
||||
else
|
||||
{
|
||||
subtitle_mgr_err("%s::%s track id %d unknown\n", FILENAME, __FUNCTION__, id);
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
if (Tracks[i].Id == *((int*)argument)) {
|
||||
CurrentTrack = i;
|
||||
break;
|
||||
}
|
||||
if (i == TrackCount) {
|
||||
subtitle_mgr_err("%s::%s track id %d unknown\n", FILENAME, __FUNCTION__, *((int*)argument));
|
||||
ret = cERR_SUBTITLE_MGR_ERROR;
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user