diff options
author | Roman Shaposhnik <roman@shaposhnik.org> | 2006-04-01 23:13:53 +0000 |
---|---|---|
committer | Roman Shaposhnik <roman@shaposhnik.org> | 2006-04-01 23:13:53 +0000 |
commit | c4e7baa85cb833db55661670e3b56c8dca45dbe3 (patch) | |
tree | 13262799530a170133806d764245713a5901f287 /libavformat/dv.c | |
parent | d2fbcb3bc8c4dea82138c6d636e87d6fe3558604 (diff) | |
download | ffmpeg-c4e7baa85cb833db55661670e3b56c8dca45dbe3.tar.gz |
* fixing DV-in-AVI type1 packet production bug
Originally committed as revision 5262 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/dv.c')
-rw-r--r-- | libavformat/dv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c index 88680fc07c..bec1759202 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -834,8 +834,11 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, { 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 */ |