FFmpeg/libavformat
Xiaohan Wang f5f2209d68 ffmpeg: Fix memset size on ctts_data in mov_read_trun() (round 2)
The allocated size of sc->ctts_data is
(st->nb_index_entries + entries) * sizeof(*sc->ctts_data).

The size to memset at offset sc->ctts_data + sc->ctts_count should be
(st->nb_index_entries + entries - sc->ctts_count) *
sizeof(*sc->ctts_data))

The current code missed |entries| I believe, which was introduced in
https://patchwork.ffmpeg.org/patch/5541/.

However, after offline discussion, it seems the original code is much
more clear to read (before https://patchwork.ffmpeg.org/patch/5541/).

Hence this CL revert the memset logic to it's previous state by
remembering the |old_ctts_allocated_size|, and only memset the newly
allocated entries.

BUG=812567

Change-Id: Ibe94c7138e5818bfaae76866bfa6619a9b8a2b6b
Reviewed-on: https://chromium-review.googlesource.com/934925
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-01 22:54:49 +01:00
..
2017-03-29 14:49:29 +02:00
2017-10-05 17:10:23 +02:00
2017-10-05 17:10:23 +02:00
2017-02-01 02:57:40 +01:00
2017-10-19 22:07:21 +02:00
2017-09-20 03:31:48 +02:00
2017-10-19 22:07:21 +02:00
2017-09-01 18:52:56 +08:00
2016-10-21 19:41:09 +02:00
2017-10-05 17:10:23 +02:00
2017-08-30 12:13:01 +02:00
2017-02-11 20:20:07 +01:00
2017-09-07 15:19:22 +02:00
2018-02-04 15:19:41 +01:00
2017-10-05 17:10:23 +02:00
2018-02-06 23:08:42 -03:00
2017-12-13 15:10:07 +00:00
2017-04-20 15:39:18 +00:00
2017-11-05 10:42:07 +01:00
2017-12-08 16:01:09 +01:00
2017-03-30 13:26:04 +02:00
2016-11-07 00:51:49 +01:00
2017-10-05 17:10:23 +02:00
2017-06-13 19:49:06 +02:00
2018-02-11 20:03:33 +01:00
2018-02-11 20:03:33 +01:00
2017-04-25 15:39:10 +02:00
2018-02-11 20:03:33 +01:00
2018-02-11 20:03:33 +01:00
2016-11-23 01:16:42 +01:00
2017-01-30 11:00:58 +01:00
2017-09-09 12:07:14 +02:00
2017-12-31 16:14:23 +01:00
2017-11-24 15:05:35 -03:00
2017-09-22 01:33:22 +02:00
2017-07-16 16:09:17 +01:00
2016-11-07 00:51:49 +01:00