AACTrackImpl crashes when Track is longer than 11 seconds
Closed this issue · 1 comments
fl034 commented
Hi @timsu and others,
encoding to aac works like a charm, but it crashes at this part, when my track is longer than 11 seconds or something like 1024 Bytes:
try {
new AACToM4A().convert(TestWearActivity.this, aacFile, m4aFileString);
Log.i(TAG, "File Saved!");
} catch (IOException e) {
Log.e(TAG, "error converting", e);
}
Here's the stacktrace
04-14 11:43:11.386 7586-7672/com.myapplication W/linker﹕ libaac-encoder.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
04-14 11:43:11.678 7586-7672/com.myapplication W/System.err﹕ well you got 274432
04-14 11:43:11.720 7586-7604/com.myapplication V/com.myapplication.common.InternetReachability$NetworkCheckTask﹕ Network is available
04-14 11:43:11.720 7586-7604/com.myapplication V/com.myapplication.activity.MainActivity﹕ Internet is available
04-14 11:43:11.786 7586-7672/com.myapplication I/DefaultMp4Builder﹕ Creating Mp4TrackImpl com.googlecode.mp4parser.authoring.tracks.AACTrackImpl@3948bde4
04-14 11:43:11.808 7586-7672/com.myapplication E/art﹕ Invalid capacity given to PushLocalFrame: 755
--------- beginning of crash
04-14 11:43:11.809 7586-7672/com.myapplication A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffffc in tid 7672 (AsyncTask #5)
04-14 11:43:11.915 181-181/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-14 11:43:11.915 181-181/? I/DEBUG﹕ Build fingerprint: 'google/razor/flo:5.0.2/LRX22G/1649326:user/release-keys'
04-14 11:43:11.915 181-181/? I/DEBUG﹕ Revision: '0'
04-14 11:43:11.915 181-181/? I/DEBUG﹕ ABI: 'arm'
04-14 11:43:11.916 181-181/? I/DEBUG﹕ pid: 7586, tid: 7672, name: AsyncTask #5 >>> com.myapplication <<<
04-14 11:43:11.916 181-181/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffffc
04-14 11:43:11.949 181-181/? I/DEBUG﹕ r0 00000000 r1 00000000 r2 00000000 r3 fffffaa0
04-14 11:43:11.949 181-181/? I/DEBUG﹕ r4 00000000 r5 00000043 r6 a4498080 r7 9928e610
04-14 11:43:11.949 181-181/? I/DEBUG﹕ r8 9928e670 r9 b4ffca64 sl 00000000 fp 137c5000
04-14 11:43:11.949 181-181/? I/DEBUG﹕ ip b6fc79b8 sp 9928e4e8 lr b4ec079f pc b4ec07a8 cpsr 68070030
04-14 11:43:11.950 181-181/? I/DEBUG﹕ backtrace:
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #00 pc 001c77a8 /system/lib/libart.so (art::JNI::PopLocalFrame(_JNIEnv*, _jobject*)+283)
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #01 pc 000b5f2d /system/lib/libart.so (art::CheckJNI::PopLocalFrame(_JNIEnv*, _jobject*)+56)
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #02 pc 0001e0a1 /system/lib/libjavacore.so
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #03 pc 00021985 /system/lib/libjavacore.so
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #04 pc 00021c99 /system/lib/libjavacore.so
04-14 11:43:11.950 181-181/? I/DEBUG﹕ #05 pc 00271d63 /data/dalvik-cache/arm/system@framework@boot.oat
04-14 11:43:12.297 181-181/? W/debuggerd﹕ type=1400 audit(0.0:12): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:12.297 181-181/? W/debuggerd﹕ type=1400 audit(0.0:13): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.278 181-181/? W/debuggerd﹕ type=1400 audit(0.0:14): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.278 181-181/? W/debuggerd﹕ type=1400 audit(0.0:15): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.308 181-181/? W/debuggerd﹕ type=1400 audit(0.0:16): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
04-14 11:43:13.308 181-181/? W/debuggerd﹕ type=1400 audit(0.0:17): avc: denied { read } for name="kgsl-3d0" dev="tmpfs" ino=7640 scontext=u:r:debuggerd:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
--------- beginning of system
My PCM file has sample rate 44100Hz @ 16bit
The encoder is initialized with the following line of code:
encoder.init(128000, 1, 44100, 16, aacFileString);
It would be really great, if you could help me.
Greetings,
Frank
fl034 commented
Solved this problem by updating com.googlecode.mp4parser:isoparser to version 1.0.6. I had to adapt AACToM4A.java according to https://github.com/sannies/mp4parser/blob/master/README.md.