video_common: Fixed search algo for resolution less than supported
check for boundary case when mid=0 before decrementing Signed-off-by: Rohit Consul <rohit.consul@xilinx.com>
This commit is contained in:
parent
cfe280bd79
commit
96929a7703
1 changed files with 6 additions and 1 deletions
|
@ -217,7 +217,12 @@ XVidC_VideoMode XVidC_GetVideoModeId(u32 Width, u32 Height, u32 FrameRate,
|
|||
break;
|
||||
}
|
||||
else if (Width < HActive) {
|
||||
High = Mid - 1;
|
||||
if (Mid == 0) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
High = Mid - 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Low = Mid + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue