aboutsummaryrefslogtreecommitdiff
path: root/decoder/ih264d_parse_headers.c
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2015-10-06 09:03:25 +0530
committerMarco Nelissen <marcone@google.com>2017-02-13 15:30:46 -0800
commit9d60a0c5da96c4bbbad11266f4d88133284836b4 (patch)
tree8cae480b201bac98831562cb0bfb85637a8412ac /decoder/ih264d_parse_headers.c
parent43a184ad481e2346f03f1398af74c04a3bb46e4d (diff)
downloadlibavc-9d60a0c5da96c4bbbad11266f4d88133284836b4.tar.gz
Decoder: Added a check for unsupported resolutions
Decoder now returns an error for resolutions greater than 3840x2176 Bug: 24542936 Change-Id: I38be0e4c5cf2a980bfd4c781f3b49171f73b5ccb
Diffstat (limited to 'decoder/ih264d_parse_headers.c')
-rw-r--r--decoder/ih264d_parse_headers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c
index 7b0bdcb..3116d16 100644
--- a/decoder/ih264d_parse_headers.c
+++ b/decoder/ih264d_parse_headers.c
@@ -933,6 +933,12 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
return IVD_RES_CHANGED;
}
+ /* Check for unsupported resolutions */
+ if((u2_pic_wd > H264_MAX_FRAME_WIDTH) || (u2_pic_ht > H264_MAX_FRAME_HEIGHT))
+ {
+ return IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED;
+ }
+
ps_dec->u2_disp_height = i4_cropped_ht;
ps_dec->u2_disp_width = i4_cropped_wd;