fix crash issue because of high memory usage 05/251705/1
authorjiyong.min <jiyong.min@samsung.com>
Mon, 18 Jan 2021 07:18:18 +0000 (16:18 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 18 Jan 2021 23:45:57 +0000 (23:45 +0000)
commit56701e69f1b9d94f9bc7483c2310f6687f672fe4
tree4328acea6cd50b99aeb8215e9c9384a672b497d9
parenta45ab5085d84a40ecc53bc254c41571b0fc30e05
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