mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
dvenc: Validate the frame size before copying it
This commit is contained in:
parent
7139489c45
commit
f7986239f4
@ -249,6 +249,11 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
|
|||||||
/* FIXME: we have to have more sensible approach than this one */
|
/* FIXME: we have to have more sensible approach than this one */
|
||||||
if (c->has_video)
|
if (c->has_video)
|
||||||
av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
|
av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
|
||||||
|
if (data_size != c->sys->frame_size) {
|
||||||
|
av_log(st->codec, AV_LOG_ERROR, "Unexpected frame size, %d != %d\n",
|
||||||
|
data_size, c->sys->frame_size);
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(*frame, data, c->sys->frame_size);
|
memcpy(*frame, data, c->sys->frame_size);
|
||||||
c->has_video = 1;
|
c->has_video = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user