Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AVCodecDecoder: use swresample to interleave audio channels.
Some codecs will always output audio in planar mode no matter what we request. This is the case for example with AAC used for youtube. We now use swresample to convert from planar to packed format. Note that since swresample does its own buffering, we could probably do away with some of the code that handled buffering before, making the audio pipeline simpler and faster. Fixes audio in youtube, but now the video plays at 2x speed. It seems something is wrong with the timestamps. Possible things to investigate: * why do we use the packet dts instead of the pts from the frames anyway? * the pts and pkt_dts are in "stream time_base units". We seem to assume microseconds for audio but this is probably not the case. Or did I miss where the conversion is done?
- Loading branch information
1 parent
235725e
commit 856cc59
Showing
3 changed files
with
35 additions
and
41 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