diff options
author | peak3d <pfau@peak3d.de> | 2018-01-31 09:14:33 +0100 |
---|---|---|
committer | peak3d <pfau@peak3d.de> | 2018-01-31 09:14:33 +0100 |
commit | c07dc7fdf891b113d33b9b8c6ccac7e67126a1f9 (patch) | |
tree | aa3071c8df94b066ac4f1e163af52ae5099d6067 | |
parent | b697e8d804bfe587999a317ef7eef3bc459e0afb (diff) |
[VP] Add Reset method to VideoPicture which has changed from struct to class
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp | 33 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp index e12dc7c869..90277fdbea 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp @@ -42,6 +42,39 @@ VideoPicture::~VideoPicture() } } +void VideoPicture::Reset() +{ + if (videoBuffer) + videoBuffer->Release(); + videoBuffer = nullptr; + pts = DVD_NOPTS_VALUE; + dts = DVD_NOPTS_VALUE; + iFlags = 0; + iRepeatPicture = 0; + iDuration = 0; + iFrameType = 0; + color_space = AVCOL_SPC_UNSPECIFIED; + color_range = 0; + chroma_position = 0; + color_primaries = 0; + color_transfer = 0; + colorBits = 8; + stereoMode.clear(); + + qp_table = nullptr; + qstride = 0; + qscale_type = 0; + pict_type = 0; + + hasDisplayMetadata = false; + hasLightMetadata = false; + + iWidth = 0; + iHeight = 0; + iDisplayWidth = 0; + iDisplayHeight = 0; +} + VideoPicture& VideoPicture::CopyRef(const VideoPicture &pic) { if (videoBuffer) diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h index e482ea9e73..20a13d8c93 100644 --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h @@ -53,6 +53,7 @@ public: ~VideoPicture(); VideoPicture& CopyRef(const VideoPicture &pic); VideoPicture& SetParams(const VideoPicture &pic); + void Reset(); // reinitialize members, videoBuffer will be released if set! CVideoBuffer *videoBuffer = nullptr; |