diff options
Diffstat (limited to 'libavcodec/dv.c')
-rw-r--r-- | libavcodec/dv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 1e190a5cbd..f548bffd8b 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -931,7 +931,9 @@ static int dvvideo_encode_frame(AVCodecContext *c, uint8_t *buf, int buf_size, s->sys = dv_codec_profile(c); if (!s->sys) return -1; - + if(buf_size < s->sys->frame_size) + return -1; + c->pix_fmt = s->sys->pix_fmt; s->picture = *((AVFrame *)data); |