Support for retrieving frame size and type without actually reading its data.

This commit is contained in:
Moritz Bunkus 2003-10-14 12:16:57 +00:00
parent 539713395b
commit 940303e9db
2 changed files with 10 additions and 0 deletions

View File

@ -2470,6 +2470,11 @@ long AVI_read_frame(avi_t *AVI, char *vidbuf, int *keyframe)
*keyframe = (AVI->video_index[AVI->video_pos].key==0x10) ? 1:0;
if (vidbuf == NULL) {
AVI->video_pos++;
return n;
}
lseek(AVI->fdes, AVI->video_index[AVI->video_pos].pos, SEEK_SET);
if (avi_read(AVI->fdes,vidbuf,n) != n)

View File

@ -1687,6 +1687,11 @@ long AVI_read_frame(avi_t *AVI, char *vidbuf, int *keyframe)
*keyframe = (AVI->video_index[AVI->video_pos].key==0x10) ? 1:0;
if (vidbuf == NULL) {
AVI->video_pos++;
return n;
}
lseek(AVI->fdes, AVI->video_index[AVI->video_pos].pos, SEEK_SET);
if (avi_read(AVI->fdes,vidbuf,n) != n)