mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Support for retrieving frame size and type without actually reading its data.
This commit is contained in:
parent
539713395b
commit
940303e9db
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user