This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aubuf: prevent faulty timestamps (#75)
* aubuf: prevent faulty timestamps for partial read There are applications where a useful timestamp is not available. E.g. if audio files are read and decoded. Then audio frames are written to aubuf with `timestamp == 0`. In such cases a partial read with `aubuf_read_auframe()` set a wrong timestamp to the rest frame. * aubuf: set correct timestamps if app provides zero For partial read timestamps are changed for the rest frames. This works only if the timestamps are already set correctly during writing. This commit handles also the case correct if the application provides timestamps and the first frame has timestamp zero and the first read is partial. * aubuf,auframe: move auframe_bytes_to_timestamp() to auframe * aubuf: reset also written_sz in aubuf_flush()
- Loading branch information
Showing
4 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters