<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Reviewed and committed.<br>
<br>
Thanks,<br>
Christian.<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>Von: </b>"Rico Schüller" <kgbricola@web.de><br><b>An: </b>mesa-dev@lists.freedesktop.org<br><b>CC: </b>"Rico Schüller" <kgbricola@web.de><br><b>Gesendet: </b>Samstag, 14. September 2013 20:27:07<br><b>Betreff: </b>[Mesa-dev] [PATCH] vdpau/decode: Check max width and max height.<br><br>---<br> src/gallium/state_trackers/vdpau/decode.c | 20 ++++++++++++++++++++<br> 1 file changed, 20 insertions(+)<br><br>diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c<br>index 47ca229..b144b83 100644<br>--- a/src/gallium/state_trackers/vdpau/decode.c<br>+++ b/src/gallium/state_trackers/vdpau/decode.c<br>@@ -51,6 +51,7 @@ vlVdpDecoderCreate(VdpDevice device,<br> vlVdpDecoder *vldecoder;<br> VdpStatus ret;<br> bool supported;<br>+ uint32_t maxwidth, maxheight;<br> <br> if (!decoder)<br> return VDP_STATUS_INVALID_POINTER;<br>@@ -84,6 +85,25 @@ vlVdpDecoderCreate(VdpDevice device,<br> return VDP_STATUS_INVALID_DECODER_PROFILE;<br> }<br> <br>+ maxwidth = screen->get_video_param<br>+ (<br>+ screen,<br>+ templat.profile,<br>+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,<br>+ PIPE_VIDEO_CAP_MAX_WIDTH<br>+ );<br>+ maxheight = screen->get_video_param<br>+ (<br>+ screen,<br>+ templat.profile,<br>+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,<br>+ PIPE_VIDEO_CAP_MAX_HEIGHT<br>+ );<br>+ if (width > maxwidth || height > maxheight) {<br>+ pipe_mutex_unlock(dev->mutex);<br>+ return VDP_STATUS_INVALID_SIZE;<br>+ }<br>+<br> vldecoder = CALLOC(1,sizeof(vlVdpDecoder));<br> if (!vldecoder) {<br> pipe_mutex_unlock(dev->mutex);<br>-- <br>1.8.3.1<br><br>_______________________________________________<br>mesa-dev mailing list<br>mesa-dev@lists.freedesktop.org<br>http://lists.freedesktop.org/mailman/listinfo/mesa-dev<br></div><br></div></body></html>