Andreas Rheinhardt
9abda1365c
avcodec/rv34, mpegvideo: Fix segfault upon frame size change error
...
The RealVideo 3.0 and 4.0 decoders call ff_mpv_common_init() only during
their init function and not during decode_frame(); when the size of the
frame changes, they call ff_mpv_common_frame_size_change(). Yet upon
error, said function calls ff_mpv_common_end() which frees the whole
MpegEncContext and not only those parts that
ff_mpv_common_frame_size_change() reinits. As a result, the context will
never be usable again; worse, because decode_frame() contains no check
for whether the context is initialized or not, it is presumed that it is
initialized, leading to segfaults. Basically the same happens if
rv34_decoder_realloc() fails.
This commit fixes this by only resetting the parts that
ff_mpv_common_frame_size_change() changes upon error and by actually
checking whether the context is in need of reinitialization in
ff_rv34_decode_frame().
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-08 01:17:24 +02:00
..
2021-03-30 12:36:32 +02:00
2021-03-11 16:06:33 +01:00
2021-03-22 02:43:04 +01:00
2021-04-03 13:07:43 +02:00
2021-03-10 20:26:36 -03:00
2021-03-30 12:36:32 +02:00
2021-03-26 16:00:14 +01:00
2021-04-02 12:06:56 +02:00
2021-04-02 12:19:07 +02:00
2021-03-25 12:51:09 +10:00
2021-04-02 09:00:32 +10:00
2021-03-10 20:26:36 -03:00
2021-03-30 12:36:32 +02:00
2021-03-17 13:42:54 -03:00
2021-03-17 13:42:54 -03:00
2021-03-17 13:42:54 -03:00
2021-04-02 19:07:59 +02:00
2021-03-30 12:36:32 +02:00
2021-03-10 20:26:36 -03:00
2021-04-02 18:05:02 +02:00
2021-03-24 08:00:57 +01:00
2021-03-14 13:37:01 -03:00
2021-03-19 03:12:24 +01:00
2021-04-02 19:01:13 +02:00
2021-04-06 03:20:59 +02:00
2021-03-10 20:26:36 -03:00
2021-03-12 23:25:23 +01:00
2021-03-12 22:45:33 +00:00
2021-03-12 23:25:23 +01:00
2021-03-12 22:45:33 +00:00
2021-03-12 23:24:31 +01:00
2021-03-30 12:36:32 +02:00
2021-04-03 19:27:21 +02:00
2021-04-03 19:27:21 +02:00
2021-03-30 12:36:32 +02:00
2021-03-22 02:43:04 +01:00
2021-03-30 12:36:32 +02:00
2021-03-19 15:33:54 -03:00
2021-03-16 10:38:41 +01:00
2021-03-17 14:12:18 -03:00
2021-03-30 12:36:32 +02:00
2021-04-01 14:01:47 +02:00
2021-03-22 02:43:04 +01:00
2021-03-22 02:43:04 +01:00
2021-03-30 19:57:34 +02:00
2021-03-29 22:19:39 +02:00
2021-03-30 12:36:32 +02:00
2021-04-02 12:19:07 +02:00
2021-03-17 14:12:18 -03:00
2021-03-16 10:52:27 +01:00
2021-04-01 10:10:21 +02:00
2021-03-13 21:02:31 +01:00
2021-03-30 12:36:32 +02:00
2021-03-30 12:36:32 +02:00
2021-03-26 15:53:30 +01:00
2021-03-13 21:02:31 +01:00
2021-04-02 18:55:27 +02:00
2021-04-01 14:52:43 +02:00
2021-04-01 14:48:01 +02:00
2021-03-22 02:43:04 +01:00
2021-03-11 21:41:52 +00:00
2021-04-08 01:07:50 +02:00
2021-04-08 01:07:50 +02:00
2021-03-15 06:42:29 +01:00
2021-04-02 18:04:35 +02:00
2021-03-31 23:09:35 +02:00
2021-03-10 20:26:36 -03:00
2021-04-01 10:10:21 +02:00
2021-03-30 12:36:32 +02:00
2021-03-10 20:26:36 -03:00
2021-03-30 12:36:32 +02:00
2021-03-22 02:43:04 +01:00
2021-03-22 02:43:04 +01:00
2021-03-16 10:34:29 +01:00
2021-03-22 02:43:04 +01:00
2021-03-14 23:29:51 +01:00
2021-03-25 00:32:47 +01:00
2021-04-01 14:41:31 +02:00
2021-03-16 10:38:41 +01:00
2021-03-21 09:46:23 +01:00
2021-03-16 10:38:41 +01:00
2021-03-17 14:36:13 +01:00
2021-03-11 02:02:26 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-17 13:43:56 -03:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-16 10:38:41 +01:00
2021-03-26 18:36:28 -03:00
2021-03-30 12:36:32 +02:00
2021-04-01 10:10:21 +02:00
2021-03-30 12:36:32 +02:00
2021-03-30 12:36:32 +02:00
2021-03-19 15:35:35 -03:00
2021-03-10 14:09:14 +01:00
2021-03-17 13:44:16 -03:00
2021-04-03 22:26:51 +02:00
2021-04-03 22:26:51 +02:00
2021-03-30 12:36:32 +02:00
2021-03-31 14:37:05 +02:00
2021-03-30 12:36:32 +02:00
2021-04-01 14:50:25 +02:00
2021-04-01 14:50:25 +02:00
2021-04-08 01:07:50 +02:00
2021-03-30 12:36:32 +02:00
2021-04-08 01:07:50 +02:00
2021-03-30 12:36:32 +02:00
2021-03-30 12:36:32 +02:00
2021-03-31 23:09:35 +02:00
2021-04-02 16:01:10 +02:00
2021-04-08 01:17:24 +02:00
2021-03-10 20:26:36 -03:00
2021-04-02 16:01:10 +02:00
2021-04-08 01:07:50 +02:00
2021-04-02 16:01:10 +02:00
2021-03-22 02:43:04 +01:00
2021-04-01 14:44:40 +02:00
2021-03-22 02:43:04 +01:00
2021-03-10 20:26:36 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-04-05 18:36:51 +02:00
2021-03-17 14:12:17 -03:00
2021-03-19 03:12:24 +01:00
2021-03-20 03:56:57 +01:00
2021-03-19 00:10:24 +01:00
2021-04-01 10:10:21 +02:00
2021-04-01 14:13:50 +02:00
2021-04-02 18:45:05 +02:00
2021-03-30 12:36:32 +02:00
2021-03-26 03:04:28 +01:00
2021-03-16 10:34:29 +01:00
2021-03-30 12:36:32 +02:00
2021-03-22 02:43:04 +01:00
2021-03-22 02:43:04 +01:00
2021-04-01 14:41:20 +02:00
2021-04-03 11:54:12 +02:00
2021-03-30 12:36:32 +02:00
2021-03-22 02:43:04 +01:00
2021-04-08 01:16:25 +02:00
2021-04-08 01:17:24 +02:00
2021-03-30 12:36:32 +02:00
2021-03-29 22:19:39 +02:00
2021-03-26 16:00:14 +01:00
2021-03-22 02:43:04 +01:00
2021-03-30 12:36:32 +02:00
2021-03-19 23:59:45 +01:00
2021-03-10 20:26:36 -03:00
2021-03-30 12:36:32 +02:00
2021-03-23 13:51:18 +01:00
2021-03-17 15:06:47 -03:00
2021-04-02 17:40:54 +02:00
2021-03-22 02:43:04 +01:00
2021-03-30 12:36:32 +02:00
2021-03-19 15:35:35 -03:00
2021-03-30 12:36:32 +02:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-17 13:44:16 -03:00
2021-03-25 00:02:17 +01:00
2021-03-20 01:02:11 +01:00
2021-03-19 14:50:48 -04:00
2021-04-01 14:45:54 +02:00
2021-03-30 12:36:32 +02:00
2021-03-30 12:36:32 +02:00
2021-03-17 15:06:48 -03:00
2021-03-30 12:36:32 +02:00
2021-04-03 22:26:51 +02:00
2021-03-30 12:36:32 +02:00