summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2019-03-21 17:59:49 -0700
committerRay Essick <essick@google.com>2019-05-01 13:25:38 -0700
commit3ea8f1d536da8f09f3e663cf173fe4f1b0fe4130 (patch)
treed0ba55fd46cb12b1197726bb18effab6d9c9c421
parent4c747e2e9afa6a4852be37f97d17d9a19d8fea34 (diff)
downloadplatform_external_libmpeg2-android10-qpr2-release.tar.gz
platform_external_libmpeg2-android10-qpr2-release.tar.bz2
platform_external_libmpeg2-android10-qpr2-release.zip
Current check did not allow stride to be set equal to width of the clip, once it was set to a larger value. In one of the AdaptivePlaybackTests, stride is set to a value larger than current width before decoding the header and then set to value equal to width as buffers are allocated as per the new width. Decoder was expecting the stride to be larger value, thus resulting in buffer size errors. Bug: 124531341 Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases \ -t android.media.cts.AdaptivePlaybackTest#testMpeg2_adaptiveDrc Change-Id: I056aa943ab4281d268926a670bef7e9503227cb5
-rw-r--r--decoder/impeg2d_api_main.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/decoder/impeg2d_api_main.c b/decoder/impeg2d_api_main.c
index d14b019..33a7281 100644
--- a/decoder/impeg2d_api_main.c
+++ b/decoder/impeg2d_api_main.c
@@ -1087,18 +1087,7 @@ IV_API_CALL_STATUS_T impeg2d_api_set_params(iv_obj_t *ps_dechdl,void *pv_api_ip,
if(ps_ctl_dec_ip->s_ivd_ctl_set_config_ip_t.u4_disp_wd != 0)
{
- if(ps_dec_state->u2_header_done == 1)
- {
- if (ps_ctl_dec_ip->s_ivd_ctl_set_config_ip_t.u4_disp_wd > ps_dec_state->u2_frame_width)
- {
- ps_dec_state->u4_frm_buf_stride = ps_ctl_dec_ip->s_ivd_ctl_set_config_ip_t.u4_disp_wd;
- }
- }
- else
- {
- ps_dec_state->u4_frm_buf_stride = ps_ctl_dec_ip->s_ivd_ctl_set_config_ip_t.u4_disp_wd;
- }
-
+ ps_dec_state->u4_frm_buf_stride = ps_ctl_dec_ip->s_ivd_ctl_set_config_ip_t.u4_disp_wd;
}
else
{