diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2012-06-06 14:35:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 08:28:08 +0200 |
commit | 74383cb40cfd87e5e07a91122678ebf6b7af5222 (patch) | |
tree | d09529e82285a1b8f24fd5f306b655d60bc0e538 /src/multimedia/video/qvideoframe.cpp | |
parent | 62749d654d6bbd50d84089e038529fda815cf96f (diff) |
Added QAbstractVideoBuffer::release virtual method
It's useful when the buffer pool stores QAbstractVideoBuffer
instances instead of underlying system buffers and
allows to avoid reallocation of QAbstractVideoBuffer instances.
The default implementation deletes the buffer,
so this change is source compatible.
Change-Id: I7dadd7dac529748b5eb33e5aa7c2d0578b8b1634
Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/multimedia/video/qvideoframe.cpp')
-rw-r--r-- | src/multimedia/video/qvideoframe.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp index c17a88835..4b1309806 100644 --- a/src/multimedia/video/qvideoframe.cpp +++ b/src/multimedia/video/qvideoframe.cpp @@ -102,7 +102,8 @@ public: ~QVideoFramePrivate() { - delete buffer; + if (buffer) + buffer->release(); } QSize size; |