On 3/4/2021 3:19 AM, suji.velupil...@broadcom.com wrote:
From: Patrick Rault <patrick.ra...@broadcom.com>

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

Signed-off-by: Patrick Rault <patrick.ra...@broadcom.com>
Signed-off-by: Suji Velupillai <suji.velupil...@broadcom.com>
---
  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
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to