[vlc-commits] avcodec:va_surface: simplify the setup flow
Steve Lhomme
git at videolan.org
Tue Mar 20 10:36:41 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Mar 20 10:14:24 2018 +0100| [23177c31517be0626240662b74aac4b33ed06a4b] | committer: Steve Lhomme
avcodec:va_surface: simplify the setup flow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23177c31517be0626240662b74aac4b33ed06a4b
---
modules/codec/avcodec/va_surface.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index dcd512527f..60a00c7e99 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -95,12 +95,12 @@ int va_pool_SetupDecoder(vlc_va_t *va, va_pool_t *va_pool, const AVCodecContext
fmt.i_frame_rate = avctx->framerate.num;
fmt.i_frame_rate_base = avctx->framerate.den;
- if (va_pool->pf_create_decoder_surfaces(va, avctx->codec_id, &fmt, count))
- return VLC_EGENERIC;
-
- va_pool->surface_width = surface_width;
- va_pool->surface_height = surface_height;
- err = VLC_SUCCESS;
+ err = va_pool->pf_create_decoder_surfaces(va, avctx->codec_id, &fmt, count);
+ if (err == VLC_SUCCESS)
+ {
+ va_pool->surface_width = surface_width;
+ va_pool->surface_height = surface_height;
+ }
done:
va_pool->surface_count = i;
More information about the vlc-commits
mailing list