mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-02 12:53:29 +00:00
rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 4a29b47186
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
9973ca992e
commit
28d948ac44
@ -543,6 +543,11 @@ static int rv10_decode_packet(AVCodecContext *avctx,
|
|||||||
if(MPV_frame_start(s, avctx) < 0)
|
if(MPV_frame_start(s, avctx) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
ff_er_frame_start(s);
|
ff_er_frame_start(s);
|
||||||
|
} else {
|
||||||
|
if (s->current_picture_ptr->pict_type != s->pict_type) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
av_dlog(avctx, "qscale=%d\n", s->qscale);
|
av_dlog(avctx, "qscale=%d\n", s->qscale);
|
||||||
|
Loading…
Reference in New Issue
Block a user