Skip to content

Commit

Permalink
[ASS] - fixed display of time overlapping ass subs
Browse files Browse the repository at this point in the history
  • Loading branch information
Memphiz committed Sep 27, 2012
1 parent f5538a9 commit 0c76257
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,13 @@ void CDVDPlayerSubtitle::Process(double pts)
return;

CDVDOverlay* pOverlay = m_pSubtitleFileParser->Parse(pts);
if (pOverlay)
m_pOverlayContainer->Add(pOverlay);
// add all overlays which fit the pts
while(pOverlay)
{
if (pOverlay)
m_pOverlayContainer->Add(pOverlay);
pOverlay = m_pSubtitleFileParser->Parse(pts);
}

m_lastPts = pts;
}
Expand Down

5 comments on commit 0c76257

@jpsdr
Copy link

@jpsdr jpsdr commented on 0c76257 Sep 28, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are inside the play, shouldn't code be "optimised" ?
What's the point of testing again (pOverlay) with the "if", because if the while is true, so "if" is...
Unless there is an unknow reason i didn't know, code should be :
While(pOverlay)
{
m_pOverlayContainer->Add(pOverlay);
pOverlay = m_pSubtitleFileParser->Parse(pts);
}

@jpsdr
Copy link

@jpsdr jpsdr commented on 0c76257 Sep 28, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be related to the ticket i've opened ?
http://trac.xbmc.org/ticket/13302
I'll test this WE, and update ticket if it solves it.

@Memphiz
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no point in checking the pointer again (its just a leftover from wrapping that code with the loop. Thx for the headsup.

And yes this could be related to the ticket you have opened. Let me know if this fixes your ticket to.

@jpsdr
Copy link

@jpsdr jpsdr commented on 0c76257 Sep 29, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It solves the issue, but...!!!
The insane CPU usage mentioned in the forum in the feature/10bit thread on some subtitles is back.
Here : http://forum.xbmc.org/showthread.php?tid=106051&pid=1101184#pid1101184
I kept the file for testing, and mentioned part (at around 19:50) is again unplayable on my i7@870. File is played perfectly fine with MPC-HC + Directvobsub, so, insane CPU seems to be XBMC specific related.
You can get this file ([Tsumiki]Acchi_Kocchi-02[10bit][1280x720][529E1BBB].mkv) either on newsgroup (alt.binaries.multimedia.anime.highspeed) or try, if still alive, here : http://www.nyaa.eu/?page=torrentinfo&tid=304793

@jpsdr
Copy link

@jpsdr jpsdr commented on 0c76257 Sep 29, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've try to take a look, but it's out of my knowledge. The only thing i think it's that maybe it mess up or make the work of ellupus on his pull request xbmc#942 useless, and this fix has to be implemented/integrated more with this PR... It's just a maybe...

Please sign in to comment.