From 25246f7e477eebe1cfd25741ba4744cc3b577684 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Wed, 16 Mar 2011 18:45:03 +0000 Subject: More robust implementation of MPEG frame header search. The parser will not only search for the very first byte sequence that looks like a valid MPEG frame header. It will search for a valid MPEG frame header sequence, decode it, and probe if there is a consecutive MPEG frame header of the same type (MPEG version, layer, sampling frequency) at the expected position. This approach will reduce false detection of MPEG frame headers in case of errorous metadata or garbaged files. Fixes FS#12007. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29603 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index de720d4..13b66e1 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -819,7 +819,7 @@ struct plugin_api { unsigned long rec_time, unsigned long header_template, void (*progressfunc)(int), bool generate_toc); unsigned long (*find_next_frame)(int fd, long *offset, - long max_offset, unsigned long last_header); + long max_offset, unsigned long reference_header); #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) unsigned short (*peak_meter_scale_value)(unsigned short val, -- cgit v1.1