1
0
Fork 0
forked from len0rd/rockbox
Commit graph

14 commits

Author SHA1 Message Date
Roman Artiukhin
3080892d21 Codecs: mp4: Re-Fix loading tracks with metadata at the end of file
first_frame_offset is not set for mp4 files so seeking to it doesn't make any sense. It can lead only to additional re-buffer request. So instead let's just allow seek back for m4a_check_sample_offset check. And do seek_buffer(0) before reading metadata (fixes possible hang introduced in fc65bdab)

Change-Id: Ia7fae14b0137d73b5e263390be5f143deb7ca789
2024-01-12 18:30:30 +02:00
roman.artiukhin
fc65bdab4e Codecs: mp4: Fix loading tracks with metadata at the end of file
Fixes FS#13402

Change-Id: Iafb21787e8f042e913c86b249bb2552cfdf4f4a8
2023-12-23 14:35:56 -05:00
roman.artiukhin
69f62b7891 Codecs: mp4: Fix seek to end of track
Fix possible crash due to out of bound access.

Fixes FS#13371

Change-Id: I90d28fa89ceb22e6561d33abc5f2b4c7f32d323c
2023-10-03 18:36:22 +03:00
roman.artiukhin
7616822fbb Codecs: mp4: Ignore decode errors till next chunk present in lookup_table
In files with gaps between chunks and reduced lookup_table we can't properly detect all gaps in m4a_check_sample_offset. So just ignore decode errors till next chunk present in lookup_table

Change-Id: I317864dce6a2251cdb6ddb8c0ad4d7c1640cb7a1
2023-10-02 12:54:57 -04:00
Solomon Peachy
ac82a653bb libm4a: Fix warnings introduced in 001a338e51
Change-Id: Ia915e6f8babbd71533f22af566e5c45c2b40fbe5
2023-09-19 11:47:38 -04:00
roman.artiukhin
001a338e51 Codecs: mp4: Reuse lookup_table index from seek in m4a_check_sample_offset
Change-Id: If2fc3038ce8db8ddf2991406a5cce294a857eadc
2023-09-19 11:13:19 -04:00
roman.artiukhin
ef7d6009b4 Codecs: mp4: Optimize m4a_check_sample_offset
Make optimization from 2358fabb actually work.
Fix potential out of bound access.
Remove redundant zero offset check.

Change-Id: I0a0ba04670b612d410ac17a761bd08c2915721b9
2023-09-19 11:13:19 -04:00
roman.artiukhin
27aa95afcb Codecs: mp4: Fix seek in very large files
Samples count requires 64 bit

Change-Id: Ia54be57d7d15b3db19dbc29ff8a06671594abb4b
2023-09-15 09:08:18 -04:00
Aidan MacDonald
ea61347a0b codecs: aac: Prefer to resume by time instead of offset
m4a_seek_raw() is relatively inaccurate, so time-based resume
should be preferred.

Change-Id: I959ef165f9a99d12deb804c13d20413c1cecf867
2022-11-16 06:48:22 -05:00
Solomon Peachy
20b91a83d3 codecs: Fix elapsed time calculation for large files
In particular, this solves seeking glitches seen in ~6 hr mp3 files.

(Patch taken from Igor Poretsky's tree)

Change-Id: Id65b6726146b6d2d1a223e90b88e401d1b2d597a
2018-10-29 19:50:34 +01:00
Michael Sevakis
6c868dd48f Remove explicit 'enum codec_command_action' in codec API
Just use long so the compiler potentially doesn't complain about
use of other values not in the enum. It's also the type used
around the system for event ids.

Increase min codec API version.

No functional changes.

Change-Id: If4419b42912f5e4ef673adcdeb69313e503f94cc
2017-12-07 14:41:59 -05:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00
Michael Sevakis
3fd25dcbed Purge the usage of DSP_SWITCH_FREQUENCY.
DSP_SWITCH_FREQUENCY has been deprecated and the same enumerated value
as DSP_SET_FREQUENCY since major DSP revisions were committed. This
task should have been performed much earlier but, oh well, do it now.

Change-Id: I3f30d651b894136a07c7e17f78fc16a7d98631ff
2013-05-05 00:48:40 -04:00
Sean Bartell
f40bfc9267 Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-25 22:13:20 +02:00
Renamed from apps/codecs/aac.c (Browse further)