Re: [Mesa-dev] [PATCH v2] va: check null context in vlVaDestroyContext
On 12 April 2016 at 14:27, iuriewrote: It should be "Firstname Lastname" , click on any commit here https://cgit.freedesktop.org/mesa/mesa/log/ to compare or just type: git log It is a common practice for most open source projects and sometimes a requirement. Not sure if this is strictly required for Mesa. iurie, do you have any concern about having your full name here or was it just a mistake ? --- > src/gallium/state_trackers/va/context.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/gallium/state_trackers/va/context.c > b/src/gallium/state_trackers/va/context.c > index b25c381..77be8de 100644 > --- a/src/gallium/state_trackers/va/context.c > +++ b/src/gallium/state_trackers/va/context.c > @@ -283,6 +283,11 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID > context_id) > drv = VL_VA_DRIVER(ctx); > pipe_mutex_lock(drv->mutex); > context = handle_table_get(drv->htab, context_id); > + if (!context){ > + pipe_mutex_unlock(drv->mutex); > + return VA_STATUS_ERROR_INVALID_CONTEXT; > When apply your patch I can see an extra space at the end of VA_STATUS_ERROR_INVALID_CONTEXT; Please remove it. + } > + > > if (context->decoder) { >if (u_reduce_video_profile(context->decoder->profile) == > -- > 1.9.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2] va: check null context in vlVaDestroyContext
--- src/gallium/state_trackers/va/context.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index b25c381..77be8de 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -283,6 +283,11 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id) drv = VL_VA_DRIVER(ctx); pipe_mutex_lock(drv->mutex); context = handle_table_get(drv->htab, context_id); + if (!context){ + pipe_mutex_unlock(drv->mutex); + return VA_STATUS_ERROR_INVALID_CONTEXT; + } + if (context->decoder) { if (u_reduce_video_profile(context->decoder->profile) == -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2] va: check null context in vlVaDestroyContext
--- src/gallium/state_trackers/va/context.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index b25c381..77be8de 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -283,6 +283,11 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id) drv = VL_VA_DRIVER(ctx); pipe_mutex_lock(drv->mutex); context = handle_table_get(drv->htab, context_id); + if (!context){ + pipe_mutex_unlock(drv->mutex); + return VA_STATUS_ERROR_INVALID_CONTEXT; + } + if (context->decoder) { if (u_reduce_video_profile(context->decoder->profile) == -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev