strcpy() will terminate the string with zero,
the boot sector/buffer has only space for eight characters.
Credit goes to "cppcheck".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30351 a1c6a512-1295-4272-9138-f99709370657
I'm wondering if that also was the cause
for the lines exactly next to it:
---------------------------------
/* This cleans out the mysterious garbage that appears */
rb->lcd_clear_display();
---------------------------------
-> Atleast I see no garbage in the sim.
Credit for this bug goes to "cppcheck".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30345 a1c6a512-1295-4272-9138-f99709370657
The data abort was in find_handle() because current_handle was corrupted. This
most probably happened due to the FMS allocating Radio AA on the buffer without
resetting the buffer, corrupting buffering/playback state.
The fix is to grab buffer control explicitely.
r30308 isn't actually related, regardless of the task title.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30342 a1c6a512-1295-4272-9138-f99709370657
Do it the hwcodec way which doesn't need a buffer_alloc(). The buffer for the
.talk files is now allocated together with the voicefile buffer.
Should also fix a panic when the .talk file buffer was allocated late at runtime.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30335 a1c6a512-1295-4272-9138-f99709370657
Automatically discover the latest and greatest version of the Android SDK and
NDK by fetching it from the index.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30334 a1c6a512-1295-4272-9138-f99709370657
Centralize the selection of codec compilation flags to codec.make
to avoid having to duplicate the per cpu selection logic and the
build rule in the individual codec lib make files and make tweaking
easier.
The two special cases, libmad and libspeex were left alone.
I plan to introduce a var for arm generation so that appropriate flags
can be selected per generation as benchmarking results have shown that
different arm arches might have different optimal flags.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30330 a1c6a512-1295-4272-9138-f99709370657
Previously the scrobbler was shutdown, probably to force a log flush,
and the cache was re-allocated afterwards. Now don't shut down or
re-allocate, but instead rely on the ata idle callback which is
called called on usb insertion to do the log flush.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30325 a1c6a512-1295-4272-9138-f99709370657
Unbreaks the maemo build.
Patch by Nick Peskett with a small comment added
as suggested by Dominik Riebeling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30323 a1c6a512-1295-4272-9138-f99709370657
If the dircache was interrupted during generation (e.g. through USB
insertion), then the allocated buffer was leaked and a new one
was allocated for the second cache generation. This causes a
panic since r30308 since playback holds the control over the
audiobuffer at that time.
The fix is to simply check allocated_size instead of
dircache_size which is reset to 0 upon cancellation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30321 a1c6a512-1295-4272-9138-f99709370657
dircache_root wasn't initialized at all and the giving allocated_size
passed to buffer_release_buffer() didn't account for alignment padding.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30318 a1c6a512-1295-4272-9138-f99709370657
Implement simple which functionality. This has less features than which.py but
is sufficient, and removing an external dependency is always good.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30315 a1c6a512-1295-4272-9138-f99709370657
The buffer_offset paramter of audio_init_recording() is removed as it
was unused in both implementations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.
Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.
audiobuf and audiobufend are local to buffer.c now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657