Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error -1 writing PCM output #4

Closed
merbanan opened this issue Mar 17, 2015 · 4 comments
Closed

Error -1 writing PCM output #4

merbanan opened this issue Mar 17, 2015 · 4 comments

Comments

@merbanan
Copy link

http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts
http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%202.0%2016bit.dts

./dcadec Master\ Audio\ 7.1.dts out.wav
DTS Core Audio: 5.1 ch, 48000 Hz, 24 bit, ES, 1536 kbps
DTS-HD Master Audio: 8 ch, 48000 Hz, 24 bit
Decoding...
Error -1 writing PCM output

http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.0%2096khz.dts

Same error but it decodes to ca 90% before failing.

@merbanan
Copy link
Author

The libav/ffmpeg decoder/parser can handle all but the http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts sample file without error.

@Nevcairiel
Copy link

Note that a bunch of those files are just cut rather badly, so the last audio frame erroring out is pretty "normal".

@foo86
Copy link
Owner

foo86 commented Mar 17, 2015

This is expected. As @Nevcairiel mentioned, these files are cut badly at the end, leaving just one core frame without EXSS part. The number of decoded channels (or bitdepth, or sample rate) changes in the decoder, the WAV file writer notices that and returns -1 (invalid argument) error because it can't handle change of audio parameters once the WAV header is written. Of course a proper output sink would reconfigure itself and try to continue in this case, something the current primitive WAV writer doesn't do.

I don't know how exactly FFmpeg handles this, maybe it doesn't decode enough of extensions so that its decoder output configuration never changes, or maybe it handles change of parameters gracefully somehow.

foo86 added a commit that referenced this issue Mar 17, 2015
Add a function to convert libdcadec error code to string and use it in
dcadec application. Add an error code describing change of PCM output
parameters that WAV file writer doesn't handle.

Might help with #4.
@foo86
Copy link
Owner

foo86 commented Mar 17, 2015

http://samples.libav.org/A-codecs/DTS/dts/Master%20Audio%205.1%2024bit.dts

Actually, dcadec decodes this one without any error in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants