vlc | branch: master | Steve Lhomme <[email protected]> | Mon Jul 22 13:47:54 2019 +0200| [001ac973dd355ad165ed20cfc4b617dc598bf953] | committer: Steve Lhomme
avcodec: vaapi: get output pictures from the pool > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=001ac973dd355ad165ed20cfc4b617dc598bf953 --- modules/codec/avcodec/vaapi.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c index df7260a8ec..1623088133 100644 --- a/modules/codec/avcodec/vaapi.c +++ b/modules/codec/avcodec/vaapi.c @@ -146,7 +146,19 @@ static void Delete(vlc_va_t *va) free(sys); } -static const struct vlc_va_operations ops = { Get, NULL /* TODO */, Delete, }; +static picture_t *GetVAAPIPicture(vlc_va_t *va, const video_format_t *fmt) +{ + picture_t *pic = picture_pool_Get(va->sys->picture_pool); + if (pic && !video_format_IsSimilar(&pic->format, fmt)) + { + msg_Err(va, "mismatched pool/decoder format"); + picture_Release(pic); + pic = NULL; + } + return pic; +} + +static const struct vlc_va_operations ops = { Get, GetVAAPIPicture, Delete, }; static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *desc, enum PixelFormat pix_fmt, _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
