1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

Merge commit 'f7986239f4dbec91c743c4c5eb0a2339bd325bf6'

* commit 'f7986239f4dbec91c743c4c5eb0a2339bd325bf6':
  dvenc: Validate the frame size before copying it

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes 2015-12-07 14:45:32 +01:00
commit 255f8966b2

View File

@ -250,6 +250,11 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
/* FIXME: we have to have more sensible approach than this one */
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);
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);
c->has_video = 1;