Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[rbp] Fix for broken ASS subtitles. #2206

Merged
merged 1 commit into from

7 participants

@popcornmix
Collaborator

The video fifo patch broke some types of subtitles including ASS.
This keeps closer track of when the sleep time would have ended and calls FlipPage at the appropriate time.
I've also removed the 500ms in the sleep time calculation as that makes the subs render 500ms late. Not sure what its purpose was.

@huceke huceke was assigned
@rbej

APPLY PATCH (common): packages/mediacenter/xbmc/patches/xbmc-720-ass_subtitle_fix-0.1.patch
patching file xbmc/cores/omxplayer/OMXPlayerVideo.cpp
Hunk #2 FAILED at 453.
1 out of 2 hunks FAILED -- saving rejects to file xbmc/cores/omxplayer/OMXPlayerVideo.cpp.rej
patching file xbmc/cores/omxplayer/OMXPlayerVideo.h
make: *** [release] Error 1

@popcornmix popcornmix [rbp] Fix for broken ASS subtitles.
The video fifo patch broke some types of subtitles including ASS.
This keeps closer track of when the sleep time would have ended and calls FlipPage at the appropriate time.
I've also removed the 500ms in the sleep time calculation as that makes the subs render 500ms late. Not sure what its purpose was.
94ea56f
@rbej

Still patch error.

@popcornmix
Collaborator

@rbej
I'm not seeing this. I've just checked out a clean repo and applied the patch and it worked:

git clone git://github.com/xbmc/xbmc.git
cd xbmc
wget https://github.com/xbmc/xbmc/pull/2206.diff
git apply 2206.diff
@rbej

I have apply this patch to Frodo Final, not Xbmc 13 Alpha. Maybe this patch working only with Xbmc master brench (Xbmc 13 Alpha).

@ghost

if you don't know how to apply a damn patch you are in the wrong place. stop spamming over 100 people with your inabilities! this is not a help channel.

@samnazarko

+1 to spiff

AFAIK all that is different is OMXPlayer has support for both Additional Codec and the FlipPage patch so it may just work if you apply it after applying these patches.

Otherwise, just read the changes and manually apply.

I am more interested in seeing how this fix pans out, rather than your inability to apply a patch

@sraue
Collaborator

here is a OpenELEC build with this patch included for testing:
http://sources.openelec.tv/tmp/image/OpenELEC-RPi.arm-devel-20130211162131-r13263.tar.bz2
i see no negative performance changes here.

@cptspiff sorry, @rbej was trying to make a OpenELEC build with this patch included after a request http://forum.xbmc.org/showthread.php?tid=140518&pid=1330917#pid1330917 i told @rbej he should ask me next time if he has such problems.

@samnazarko, we all know you dont like OpenELEC but your comment was the most useless comment here (like any other "+1" and "me too" comments)

@ghost

i understand that nobody's trying to be annoying, but sometimes the cup is full and somebody get the wrath for a few weeks of spamming.. :)

@samnazarko
@NedScott

The fact that github mails a ton of people each time a comment to a PR is posted is github's fault. It's also not something that most people know about, so please stop biting peoples heads off about it.

@huceke huceke merged commit 7901a60 into xbmc:master
@popcornmix popcornmix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@popcornmix popcornmix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@popcornmix popcornmix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@popcornmix popcornmix referenced this pull request from a commit in popcornmix/xbmc
@popcornmix popcornmix [rbp] Fix for hang after seeking introduced by ASS fix
#2206 introduced a regression when seeking in some types of SD files where the video stutters and/or stalls.
This is caused by using the wrong clock in FlipPage
8b60327
@popcornmix popcornmix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@popcornmix popcornmix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@FernetMenta

dvdplayer does this only at startup waiting for the rederer to be configured.

@Koenkk Koenkk referenced this pull request in xbianonpi/xbian
Closed

Apply various patches to XBMC Frodo 12 Stable #263

@davilla davilla referenced this pull request from a commit
@popcornmix popcornmix [rbp] Fix for hang after seeking introduced by ASS fix
#2206 introduced a regression when seeking in some types of SD files where the video stutters and/or stalls.
This is caused by using the wrong clock in FlipPage
6e80100
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@hrodenburg hrodenburg referenced this pull request from a commit in hrodenburg/xbmc
@popcornmix popcornmix [rbp] Fix for hang after seeking introduced by ASS fix
#2206 introduced a regression when seeking in some types of SD files where the video stutters and/or stalls.
This is caused by using the wrong clock in FlipPage
0e74c0b
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@damianb damianb referenced this pull request in archlinuxarm/PKGBUILDs
Closed

aur/xbmc-rbp-git (arm6) needs update #408

@arnova arnova referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@margro margro referenced this pull request from a commit in margro/xbmc
@popcornmix popcornmix [rbp] Fix for hang after seeking introduced by ASS fix
#2206 introduced a regression when seeking in some types of SD files where the video stutters and/or stalls.
This is caused by using the wrong clock in FlipPage
d1b7871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 11, 2013
  1. @popcornmix

    [rbp] Fix for broken ASS subtitles.

    popcornmix authored
    The video fifo patch broke some types of subtitles including ASS.
    This keeps closer track of when the sleep time would have ended and calls FlipPage at the appropriate time.
    I've also removed the 500ms in the sleep time calculation as that makes the subs render 500ms late. Not sure what its purpose was.
This page is out of date. Refresh to see the latest.
View
19 xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -124,6 +124,7 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints)
m_started = false;
m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
m_autosync = 1;
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
m_audio_count = m_av_clock->HasAudio();
@@ -452,13 +453,23 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
m_dropbase = 0.0f;
#endif
- double pts_media = m_av_clock->OMXMediaTime(false, false);
- ProcessOverlays(iGroupId, pts_media);
+ // DVDPlayer sleeps until m_iSleepEndTime here before calling FlipPage.
+ // Video playback in asynchronous in OMXPlayer, so we don't want to do that here, as it prevents the video fifo from being kept full.
+ // So, we keep track of when FlipPage would have been called on DVDPlayer and return early if it is not time.
+ // m_iSleepEndTime == DVD_NOPTS_VALUE means we are not waiting to call FlipPage, otherwise it is the time we want to call FlipPage
+ if (m_iSleepEndTime == DVD_NOPTS_VALUE) {
+ m_iSleepEndTime = iCurrentClock + iSleepTime;
+ }
- if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) )
+ if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime)
return;
- g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE);
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
+
+ double pts_media = m_av_clock->OMXMediaTime(false, false);
+ ProcessOverlays(iGroupId, pts_media);
+
+ g_renderManager.FlipPage(CThread::m_bStop, pts_media / DVD_TIME_BASE, -1, FS_NONE);
//m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
}
View
1  xbmc/cores/omxplayer/OMXPlayerVideo.h
@@ -49,6 +49,7 @@ class OMXPlayerVideo : public CThread
bool m_open;
CDVDStreamInfo m_hints;
double m_iCurrentPts;
+ double m_iSleepEndTime;
OMXClock *m_av_clock;
COMXVideo m_omxVideo;
float m_fFrameRate;
Something went wrong with that request. Please try again.