1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt c85508f5a9 avcodec/mpeg12dec: Allocate dummy frames for non-I fields
MPEG-2 allows to pair an intra field (as first field) together
with a P-field. In this case a conformant bitstream has to satisfy
certain restrictions in order to ensure that only the I field
is used for prediction. See section 7.6.3.5 of the MPEG-2
specifications.

We do not check these restrictions; normally we simply allocate
dummy frames for reference in order to avoid checks lateron.
This happens in ff_mpv_frame_start() and therefore does not happen
for a second field. This is inconsistent. Fix this by allocating
these dummy frames for the second field, too.

This already fixes two bugs:
1. Undefined pointer arithmetic in prefetch_motion() in
mpegvideo_motion.c where it is simply presumed that the reference
frame exists.
2. Several MPEG-2 hardware accelerations rely on last_picture
being allocated for P pictures and next picture for B pictures;
e.g. VDPAU returns VDP_STATUS_INVALID_HANDLE when decoding
an I-P fields pair because the forward_reference was set incorrectly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-12 10:50:12 +02:00
..
2024-06-04 11:46:27 +02:00
2024-06-04 11:46:27 +02:00
2024-06-04 11:46:27 +02:00
2024-06-11 02:43:14 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-08 00:22:36 +02:00
2024-02-27 00:11:21 +01:00
2024-02-27 00:11:21 +01:00
2024-06-08 00:22:40 +02:00
2024-06-08 00:22:40 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-04-06 09:26:30 +02:00
2024-03-25 08:54:18 +01:00
2024-04-10 13:22:18 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-02-12 22:00:03 +02:00
2024-02-12 22:00:03 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-04 11:46:27 +02:00
2024-06-04 11:46:27 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-08 00:22:35 +02:00
2024-06-09 10:59:33 +02:00
2024-03-15 12:51:15 +01:00
2024-04-04 23:58:57 +02:00
2024-04-04 23:58:57 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-04 17:45:00 +01:00
2024-05-13 03:40:19 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-05-13 03:40:17 +02:00
2024-03-31 00:08:43 +01:00
2024-03-10 13:51:37 +01:00
2024-06-04 11:46:27 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-06-07 21:42:24 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-01-25 11:07:28 -05:00
2024-05-31 13:36:02 -03:00
2024-02-21 20:08:25 +02:00
2024-02-21 20:08:25 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-04 11:46:27 +02:00
2024-03-31 00:08:43 +01:00
2024-04-29 15:30:25 +02:00
2024-03-31 00:08:43 +01:00
2024-03-29 09:01:54 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-06-08 00:22:35 +02:00
2024-06-08 00:22:35 +02:00
2024-03-31 00:08:43 +01:00
2024-05-28 03:48:04 +02:00
2024-05-29 10:46:54 +08:00
2024-06-04 11:46:27 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-05-03 18:00:53 +03:00
2024-05-03 18:00:53 +03:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-06-03 14:13:34 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-15 12:51:15 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-05-19 22:12:54 +02:00
2024-06-07 21:42:24 +02:00
2024-04-19 13:18:04 +02:00
2024-04-29 20:46:05 +03:00
2024-04-29 20:46:05 +03:00
2024-04-19 13:18:04 +02:00
2024-04-19 13:18:04 +02:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00
2024-03-31 00:08:43 +01:00