On 3/4/2021 3:19 AM, [email protected] wrote:
From: Patrick Rault <[email protected]>

Add support to allow attached hardware to add/remove reference to the
frame buffer mirroring the ffmpeg.

Signed-off-by: Patrick Rault <[email protected]>
Signed-off-by: Suji Velupillai <[email protected]>
---
  libavutil/frame.c              |  7 ++++++-
  libavutil/hwcontext.c          | 21 +++++++++++++++++++++
  libavutil/hwcontext.h          | 15 +++++++++++++++
  libavutil/hwcontext_internal.h |  2 ++
  4 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index eab51b6a32..6f8db14bf5 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -22,6 +22,7 @@
  #include "common.h"
  #include "dict.h"
  #include "frame.h"
+#include "hwcontext.h"
  #include "imgutils.h"
  #include "mem.h"
  #include "samplefmt.h"
@@ -492,7 +493,7 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src)
          dst->nb_extended_buf = src->nb_extended_buf;
for (i = 0; i < src->nb_extended_buf; i++) {
-            dst->extended_buf[i] = av_buffer_ref(src->extended_buf[i]);
+            dst->extended_buf[i] = av_buffer_ref(dst);

dst is an AVFrame, not AVBufferRef.
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to