-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ffmpeg: Fix decoder flush for short segments
Earlier we relied on getting a sentinel (pts -1) packet back to know when the decoder is flushed. This does not work for short segments as the decoder buffers packets internally. Now we maintain the difference between packets sent - frames received and mark decoder as flushed when this becomes 0 (usually). Sometimes the decoder might not return all frames (see #155), so we give up after sending SENTINEL_MAX packets and not getting any valid frame back.
- Loading branch information
Showing
1 changed file
with
45 additions
and
15 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