diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-17 16:10:53 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-17 16:12:25 +0000 |
commit | 1a708780f3d4b431996d118df4e448b4f2a7942e (patch) | |
tree | dc389307bc577b231d25c75aed9eadec125bfc38 /libavutil/frame.c | |
parent | 26abd5149ebf9602d8036be4c6e72e08c98ea998 (diff) | |
parent | 89923e418b494e337683442ab896d754bc07341a (diff) | |
download | ffmpeg-1a708780f3d4b431996d118df4e448b4f2a7942e.tar.gz |
Merge commit '89923e418b494e337683442ab896d754bc07341a'
* commit '89923e418b494e337683442ab896d754bc07341a':
lavu: add a framework for handling hwaccel frames
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r-- | libavutil/frame.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c index 033f013458..6ee3e6fb7b 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -429,6 +429,14 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src) } } + if (src->hw_frames_ctx) { + dst->hw_frames_ctx = av_buffer_ref(src->hw_frames_ctx); + if (!dst->hw_frames_ctx) { + ret = AVERROR(ENOMEM); + goto fail; + } + } + /* duplicate extended data */ if (src->extended_data != src->data) { int ch = src->channels; @@ -490,6 +498,8 @@ void av_frame_unref(AVFrame *frame) av_buffer_unref(&frame->qp_table_buf); #endif + av_buffer_unref(&frame->hw_frames_ctx); + get_frame_defaults(frame); } |