File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/AvTranscoder/data/decoded Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ void Frame::copyProperties(const Frame& otherFrame)
68
68
av_frame_copy_props (_frame, &otherFrame.getAVFrame ());
69
69
}
70
70
71
+ bool Frame::isRefCounted () const
72
+ {
73
+ return _frame->buf [0 ];
74
+ }
75
+
71
76
void Frame::refFrame (const Frame& otherFrame)
72
77
{
73
78
const int ret = av_frame_ref (_frame, &otherFrame.getAVFrame ());
Original file line number Diff line number Diff line change @@ -52,8 +52,10 @@ class AvExport Frame
52
52
53
53
/* *
54
54
* @brief Copy the data of the given Frame.
55
- * @note This function does not allocate anything: the current frame must be already initialized and
55
+ * This function does not allocate anything: the current frame must be already initialized and
56
56
* allocated with the same parameters as the given frame, to be ready for memcpy instructions.
57
+ * @note It copies the frame data (i.e. the contents of the data / extended data arrays), not any other properties.
58
+ * @see copyProperties
57
59
*/
58
60
void copyData (const Frame& frameToRef);
59
61
@@ -62,6 +64,11 @@ class AvExport Frame
62
64
*/
63
65
void copyProperties (const Frame& otherFrame);
64
66
67
+ /* *
68
+ * @brief If the data buffer of the frame refers to data allocated by an other frame.
69
+ */
70
+ bool isRefCounted () const ;
71
+
65
72
/* *
66
73
* @brief Copy frame properties and create a new reference to data of the given frame.
67
74
* @warning This method allocates new data that will be freed by calling clear method or the destructor of the referenced frame.
You can’t perform that action at this time.
0 commit comments