fix crash issue because of high memory usage 31/252631/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/hotfix/20210202.055332 submit/tizen_6.0_hotfix/20210201.034245
authorjiyong.min <jiyong.min@samsung.com>
Mon, 18 Jan 2021 07:18:18 +0000 (16:18 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 1 Feb 2021 02:52:40 +0000 (02:52 +0000)
commitc586931b784fb82d058eb3877165dd0d6a5fe802
tree79279033205d400313a3fc986e7f3236e560a5e9
parent8792cf698b5971deddcd0d98895cc2fff93ad5e9
fix crash issue because of high memory usage

 - The memory usage is high because of the invalid 'has_b_frames' value.

   The invalid 'has_b_frames' makes the condition in line #1239 false
   and 'h264_select_output_frame()' can't set the output frame in line #1241.
   So 'avcodec_receive_frame()' return the error(-11) due to no output frame.
   'avformat_find_stream_info()' try decode frame repeatly.
   As the result, the internal buffer for decoding is raised
   in 'avformat_find_stream_info()'.

 - We applied the patch from ffmpeg.

Change-Id: I12649d6ff7650454b9fcd5181687f20bddf0b44d
(cherry picked from commit b96e080a02e9c1d5a69e7755d7f70b94395262eb)
libavcodec/h264_slice.c