Originally committed as revision 5262 to svn://svn.ffmpeg.org/ffmpeg/trunk
Roman Shaposhnik authored on 2006/04/02 08:13:53... | ... |
@@ -834,8 +834,11 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, |
834 | 834 |
{ |
835 | 835 |
int size, i; |
836 | 836 |
|
837 |
- if (buf_size < 4 || buf_size < c->sys->frame_size) |
|
838 |
- return -1; /* Broken frame, or not enough data */ |
|
837 |
+ if (buf_size < DV_PROFILE_BYTES || |
|
838 |
+ !(c->sys = dv_frame_profile(buf)) || |
|
839 |
+ buf_size < c->sys->frame_size) { |
|
840 |
+ return -1; /* Broken frame, or not enough data */ |
|
841 |
+ } |
|
839 | 842 |
|
840 | 843 |
/* Queueing audio packet */ |
841 | 844 |
/* FIXME: in case of no audio/bad audio we have to do something */ |