mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 05:50:43 +00:00
pthread_frame: properly propagate the hw frame context across frame threads
Merges Libav commit 84f22568
.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
This commit is contained in:
parent
b6587421c7
commit
98f89d615b
@ -235,6 +235,17 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
dst->sample_fmt = src->sample_fmt;
|
||||
dst->channel_layout = src->channel_layout;
|
||||
dst->internal->hwaccel_priv_data = src->internal->hwaccel_priv_data;
|
||||
|
||||
if (!!dst->hw_frames_ctx != !!src->hw_frames_ctx ||
|
||||
(dst->hw_frames_ctx && dst->hw_frames_ctx->data != src->hw_frames_ctx->data)) {
|
||||
av_buffer_unref(&dst->hw_frames_ctx);
|
||||
|
||||
if (src->hw_frames_ctx) {
|
||||
dst->hw_frames_ctx = av_buffer_ref(src->hw_frames_ctx);
|
||||
if (!dst->hw_frames_ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (for_user) {
|
||||
|
Loading…
Reference in New Issue
Block a user