Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoPlayerVideo: Need to clear pictures before switching decoder #9861

Merged
merged 2 commits into from May 23, 2016

Conversation

@popcornmix
Copy link
Member

commented May 22, 2016

The new decoder may not know how clear a picture initialised from a different decoder.
For example MMALCodec wants Release() called on clear, but VideoCodecFFMPEG does not.

@popcornmix

This comment has been minimized.

Copy link
Member Author

commented May 22, 2016

@@ -179,8 +179,11 @@ void CVideoPlayerVideo::OpenStream(CDVDStreamInfo &hint, CDVDVideoCodec* codec)
m_fForcedAspectRatio = 0.0;

if (m_pVideoCodec)
{
m_pVideoCodec->ClearPicture(&m_picture);
m_pVideoCodec->Dispose();

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta May 22, 2016

Member

please call Dispose() in destructor

other changes look ok

@popcornmix popcornmix force-pushed the popcornmix:clearpic branch from 6e7cde4 to f1eaf90 May 22, 2016
@popcornmix

This comment has been minimized.

Copy link
Member Author

commented May 22, 2016

@FernetMenta updated

@@ -99,6 +99,8 @@ CVideoPlayerVideo::CVideoPlayerVideo(CDVDClock* pClock

CVideoPlayerVideo::~CVideoPlayerVideo()
{
if (m_pVideoCodec)
m_pVideoCodec->Dispose();

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta May 22, 2016

Member

Sorry, I meant the destructor of the codec. Then we can drop Dispose() from the interface of VideoCodec.

popcornmix added 2 commits May 22, 2016
Codecs already call this from their destructors
The new decoder may not know how clear a picture initialised from a different decoder.
For example MMALCodec wants Release() called on clear, but VideoCodecFFMPEG does not.
@popcornmix popcornmix force-pushed the popcornmix:clearpic branch from f1eaf90 to 50bc5d3 May 22, 2016
@popcornmix

This comment has been minimized.

Copy link
Member Author

commented May 22, 2016

@FernetMenta updated

@FernetMenta

This comment has been minimized.

Copy link
Member

commented May 22, 2016

+1, thanks

@popcornmix

This comment has been minimized.

Copy link
Member Author

commented May 22, 2016

jenkins build this please

@popcornmix popcornmix merged commit d6f3da7 into xbmc:master May 23, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Merged build finished.
Details
@popcornmix popcornmix deleted the popcornmix:clearpic branch May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.