Comments (5)
Update:
Problem is caused by the following line returning NULL
and memset'ing the frameInfo
to all zero:
sample_buffer = NeAACDecDecode(hDecoder, &frameInfo, mp4config.bitbuf.data, mp4config.bitbuf.size);
We get division by zero, because frameInfo.channels
is zero, but frameInfo.samples
is zero too.
But I guess the "real" problem here is that the returned sample_buffer
ends up being NULL.
The first couple of calls to NeAACDecDecode()
do not return NULL though!
I tried to insert a continue statement in case that sample_buffer
is NULL, but it results in infinite loop.
(So, once NULL was returned, all subsequent calls return NULL as well)
from faad2.
I guess the decoder should simply abort if there is an AAC frame that it cannot parse.
I tried to insert a continue statement in case that sample_buffer is NULL, but it results in infinite loop.
What if you add break
there?
from faad2.
If I add a break
, then it will stop decoding very quickly and leave an (almost) empty WAV file.
My guess: The new MP4 parsing code introduced in FAAD v2.8 does not support MP4 files containing a video stream – or, more generally, MP4 files with more than a single stream – yet.
If we have more than one stream, the "MDAT" atom of the MP4 file will contain chunks of the various streams, in an interleaved fashion. For this reason, it is necessary to parse the chunk offsets and lengths from the tables in the "MOOV" atom, and then jump to the chunks belonging to the desired stream.
Simply assuming that the "MDAT" atom contains a sequence of AAC frames (all belonging to the same stream) is not going work for files with more than one stream! ...and thus for most MP4 files out there.
I hope this can be fixed, because otherwise we will be stuck with FAAD 2.7 😟
from faad2.
Just wondering, any chance for a fix? ❓
from faad2.
Bump ✨
from faad2.
Related Issues (20)
- Perpare for the next release HOT 27
- Fff
- F HOT 1
- File decoding fails
- libfaad2.dll mingw HOT 6
- Build failure with -Werror=strict-aliasing: ic_predict.c:58:16: error: dereferencing type-punned pointer will break strict-aliasing rules HOT 3
- XMMS plugin (xmms-mp4) HOT 3
- A heap-buffer-overflow vulnerability found in mp4read.c:449:63 HOT 1
- mp4read.c::u32in HOT 1
- A SEGV vulnerability found in faad2 HOT 4
- ADTS aac is not recognized HOT 2
- CMake script does not build dynamic libraries HOT 1
- man page not installed
- error: conflicting types for 'lrintf' HOT 2
- Different library versions in cmake and autotools builds HOT 6
- Builds on Debian i386 fail despite applying commit linked in #188 HOT 1
- Values begin, end variables in pns.c may not be correct in the case of short window sequences
- Incorrect table boundaries checks in huffmanc.c HOT 5
- TNS_MAX_ORDER is object type and short/long window dependent HOT 3
- TODO: fix a bunch of "warning C4711: function selected for automatic inline expansion"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faad2.