On 26 November 2015 at 08:45, Julien Isorce <julien.iso...@gmail.com> wrote:
> --- a/src/gallium/state_trackers/va/picture.c > +++ b/src/gallium/state_trackers/va/picture.c > @@ -113,12 +118,37 @@ handlePictureParameterBuffer(vlVaDriver *drv, > vlVaContext *context, vlVaBuffer * > default: > break; > } > + > + /* Create the decoder once max_references is known. */ > + if (!context->decoder) { > + if (!context->target) > + return VA_STATUS_ERROR_INVALID_CONTEXT; > + > + if (context->templat.max_references == 0) > + return VA_STATUS_ERROR_INVALID_BUFFER; > + > + if (u_reduce_video_profile(context->templat.profile) != > + PIPE_VIDEO_FORMAT_MPEG4_AVC) > + context->templat.level = u_get_h264_level(context->templat.width, > + context->templat.height, &context->templat.max_references); Erm shouldn't this one be "if profile == h264 { get_h264_level(...) }" ? With the above fixed Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com> -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev