summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-09-29 10:29:10 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-09-29 15:57:32 +0200
commitbfbf86ef18f756c4e27ab569309ef8bc7a5531ac (patch)
tree56d519185f4e61567e5b5349f0b72a0628cd0f01 /ffmpeg.c
parente84eeca5779b894ea1739296e17c4361d4638de7 (diff)
ffmpeg: pass the hwaccel frames context to the decoder
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d0f247ec68..9a8e65a1e3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2547,6 +2547,13 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
}
continue;
}
+
+ if (ist->hw_frames_ctx) {
+ s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx);
+ if (!s->hw_frames_ctx)
+ return AV_PIX_FMT_NONE;
+ }
+
ist->active_hwaccel_id = hwaccel->id;
ist->hwaccel_pix_fmt = *p;
break;