X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6df771b5f7e744c650b73f8548ab41152c0185eb..a0ae92efcfeea6d81f077be4b5423b524f59b131:/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index 0a3d0359..02c0ca94 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -120,9 +120,9 @@ eServiceDVD::eServiceDVD(const char *filename): if (fd > -1) { rd = read(fd, tmp, 255); - if (rd > 6 && !strncmp(tmp, "bestfit", 3)) + if (rd > 6 && !strncmp(tmp, "bestfit", 7)) aspect = DDVD_JUSTSCALE; - else if (rd > 8 && !strncmp(tmp, "letterbox", 5)) + else if (rd > 8 && !strncmp(tmp, "letterbox", 9)) aspect = DDVD_LETTERBOX; close(fd); } @@ -176,8 +176,11 @@ void eServiceDVD::gotMessage(int /*what*/) } case DDVD_SCREEN_UPDATE: eDebug("DVD_SCREEN_UPDATE!"); - if (m_subtitle_widget) - m_subtitle_widget->setPixmap(m_pixmap, eRect(ePoint(0, 0), m_pixmap->size())); + if (m_subtitle_widget) { + int x1,x2,y1,y2; + ddvd_get_last_blit_area(m_ddvdconfig, &x1, &x2, &y1, &y2); + m_subtitle_widget->setPixmap(m_pixmap, eRect(x1, y1, x2-x1, y2-y1)); + } break; case DDVD_SHOWOSD_STATE_PLAY: { @@ -277,6 +280,7 @@ eServiceDVD::~eServiceDVD() kill(); saveCuesheet(); ddvd_close(m_ddvdconfig); + disableSubtitles(0); } RESULT eServiceDVD::connectEvent(const Slot2 &event, ePtr &connection) @@ -531,8 +535,7 @@ PyObject *eServiceDVD::getInfoObject(int w) RESULT eServiceDVD::enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) /*entry*/) { - if (m_subtitle_widget) - delete m_subtitle_widget; + delete m_subtitle_widget; m_subtitle_widget = new eSubtitleWidget(parent); m_subtitle_widget->resize(parent->size());