Mercurial > libavformat.hg
changeset 1048:da22d8928247 libavformat
* fixing DV-in-AVI type1 packet production bug
author | romansh |
---|---|
date | Sat, 01 Apr 2006 23:13:53 +0000 |
parents | 76c75a88560d |
children | 23d44137105f |
files | dv.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dv.c Sat Apr 01 19:02:40 2006 +0000 +++ b/dv.c Sat Apr 01 23:13:53 2006 +0000 @@ -834,8 +834,11 @@ { int size, i; - if (buf_size < 4 || buf_size < c->sys->frame_size) - return -1; /* Broken frame, or not enough data */ + if (buf_size < DV_PROFILE_BYTES || + !(c->sys = dv_frame_profile(buf)) || + buf_size < c->sys->frame_size) { + return -1; /* Broken frame, or not enough data */ + } /* Queueing audio packet */ /* FIXME: in case of no audio/bad audio we have to do something */