Files
FFmpeg/libavcodec
Andreas Rheinhardt a2ccfc6bb1 avcodec/mjpegdec: Use correct number of codes for VLC tables
Commit 1249698e1b made
ff_mjpeg_decode_dht() call build_vlc() with a wrong (too hight)
number of codes. The reason it worked is that the lengths of the extraneous
entries is initialized to zero and ff_init_vlc_sparse() ignores codes
with a length of zero. But using a too high number of codes was
nevertheless bad, because a) the assert in build_vlc() could have been
triggered (namely if the real amount of codes is 256) and b) the loop in
build_vlc() uses initialized data (leading to Valgrind errors [1]).
Furthermore, the old code spend CPU cycles in said loop although the
result won't be used anyway.

[1]: http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20201008025137

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-08 20:33:50 +02:00
..
2020-02-07 13:36:57 -03:00
2020-08-07 23:04:28 +10:00
2020-09-18 11:34:11 +02:00
2020-10-07 22:16:09 +02:00
2020-06-10 12:36:44 +02:00
2020-08-26 21:13:38 +02:00
2020-08-26 21:13:38 +02:00
2020-10-07 22:16:09 +02:00
2020-10-07 22:16:09 +02:00
2020-10-07 22:16:09 +02:00
2020-03-12 20:26:48 +00:00
2020-03-12 20:26:48 +00:00
2020-05-21 09:31:08 +02:00
2019-11-13 09:08:43 -08:00
2020-02-22 00:15:43 +01:00
2019-12-05 20:20:05 +01:00
2020-03-22 11:55:44 -03:00
2020-06-05 18:14:17 +02:00
2020-06-14 18:20:37 +02:00
2020-06-15 04:22:28 +02:00
2020-07-20 18:41:09 +02:00
2020-07-20 18:41:09 +02:00
2020-10-07 22:16:09 +02:00
2019-12-10 16:09:14 +01:00
2020-01-11 23:31:18 +01:00
2020-05-12 01:00:28 +02:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-10-05 23:10:13 +08:00
2020-06-08 20:45:56 +02:00
2020-05-30 18:02:55 +02:00
2020-07-05 19:59:49 +02:00
2019-10-22 10:51:42 +08:00
2020-02-19 22:37:30 +01:00
2020-09-01 14:19:19 +02:00
2020-04-26 18:38:25 +01:00
2020-04-04 23:26:15 +02:00
2020-05-22 22:23:18 +02:00
2020-07-06 18:23:50 +01:00
2020-01-13 23:26:25 +00:00
2020-07-20 18:41:09 +02:00
2020-01-11 23:31:18 +01:00
2020-04-26 18:38:25 +01:00
2020-10-08 11:18:14 -07:00
2020-04-17 19:33:43 +10:00
2019-10-25 00:22:33 +02:00
2020-10-08 11:18:14 -07:00
2020-04-16 15:05:07 -03:00
2020-03-22 11:55:44 -03:00
2020-05-23 07:07:36 +02:00