a bit more offset
This commit is contained in:
parent
2268d4d6c4
commit
941e8602d9
2 changed files with 6 additions and 8 deletions
|
|
@ -267,7 +267,7 @@ int extract_frame_ogv(oxstate *state) {
|
|||
int fps_num = 25;
|
||||
int fps_denom = 1;
|
||||
int granuleshift = 6;
|
||||
long max_num, offset;
|
||||
long offset;
|
||||
|
||||
OggPlay * player;
|
||||
OggPlayReader * reader = NULL;
|
||||
|
|
@ -289,8 +289,8 @@ int extract_frame_ogv(oxstate *state) {
|
|||
}
|
||||
oggplay_set_data_callback(player, dump_frame_callback, state);
|
||||
|
||||
max_num = 1 << granuleshift;
|
||||
offset = (1000 * max_num * fps_denom) / fps_num;
|
||||
offset = 500 + 1000 * ((1 << granuleshift) - 1) * fps_denom / fps_num;
|
||||
fprintf (stderr, "granule: %d offset %ld\n", granuleshift, offset);
|
||||
|
||||
state->duration = oggplay_get_duration(player);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue