summaryrefslogtreecommitdiff
path: root/libavformat/dvenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/dvenc.c')
-rw-r--r--libavformat/dvenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index a33973f192..106cba4c34 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -249,6 +249,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;