wm4
de1b1a7da9
avformat/mp3dec: improve junk skipping heuristic
...
Commit 2b3e9bbfb529e6bde238aeb511b55ebe461664c8 caused problems for a
certain API user:
https://code.google.com/p/chromium/issues/detail?id=537725
https://code.google.com/p/chromium/issues/detail?id=542032
The problem seems rather arbitrary, because if there's junk, anything
can happen. In this case, the imperfect junk skipping just caused it to
read different junk, from what I can see.
We can improve the accuracy of junk detection by a lot by checking if 2
consecutive frames use the same configuration. While in theory it might
be completely fine for the 1st frame to have a different format than the
2nd frame, it's exceedingly unlikely, and I can't think of a legitimate
use-case.
This is approximately the same mpg123 does for junk skipping. The
set of compared header bits is the same as the libavcodec mp3 parser
uses for similar purposes.
2015-10-20 12:17:21 +02:00
..
2015-07-27 23:15:19 +02:00
2014-08-18 19:48:18 +02:00
2014-07-29 21:12:07 +02:00
2015-09-10 09:06:13 +02:00
2015-07-18 04:52:49 +02:00
2015-07-12 15:22:37 +02:00
2014-08-08 00:48:38 +02:00
2015-10-16 16:37:40 +02:00
2015-02-14 21:07:40 +01:00
2015-07-27 15:24:59 +01:00
2015-01-16 14:20:37 +01:00
2013-10-13 20:13:38 +00:00
2013-10-18 19:53:47 +02:00
2015-07-27 15:24:59 +01:00
2015-09-05 10:53:55 +02:00
2015-10-20 09:41:11 +02:00
2014-08-08 00:48:38 +02:00
2015-07-27 23:15:19 +02:00
2015-07-27 15:24:59 +01:00
2015-04-07 22:50:07 +02:00
2015-07-27 23:15:19 +02:00
2015-07-27 23:15:19 +02:00
2015-07-15 22:52:06 +02:00
2015-09-10 21:40:07 +02:00
2015-07-02 04:58:27 +02:00
2015-09-16 11:06:55 +02:00
2015-09-05 16:51:53 +02:00
2015-10-10 09:56:29 +02:00
2015-06-28 13:36:54 +02:00
2015-09-21 13:44:37 +02:00
2015-04-16 21:09:32 +02:00
2014-08-08 00:48:38 +02:00
2014-05-05 16:46:47 +02:00
2015-10-14 20:40:09 +02:00
2014-06-18 17:28:10 +02:00
2015-06-08 22:37:41 +02:00
2015-07-27 23:15:19 +02:00
2014-09-25 00:09:42 +02:00
2015-10-14 14:43:20 +02:00
2013-12-05 23:42:07 +01:00
2015-09-17 02:08:15 +02:00
2015-09-12 14:39:28 +02:00
2015-06-01 00:43:50 +02:00
2015-08-01 00:58:31 +02:00
2015-08-01 00:58:31 +02:00
2015-08-01 00:58:31 +02:00
2015-08-13 01:20:16 +02:00
2013-11-11 14:51:43 +01:00
2014-08-15 21:00:50 +02:00
2014-10-29 22:47:11 +01:00
2014-08-08 00:48:38 +02:00
2015-07-27 15:24:59 +01:00
2014-08-08 00:48:38 +02:00
2015-02-26 23:19:39 +01:00
2013-10-06 19:36:53 +02:00
2015-02-11 02:47:54 +01:00
2015-09-23 19:10:13 +02:00
2015-02-14 21:07:40 +01:00
2015-03-06 21:35:00 +01:00
2015-09-07 01:21:12 +02:00
2015-07-27 23:15:19 +02:00
2015-09-07 01:21:12 +02:00
2015-03-16 15:40:10 +01:00
2014-07-11 01:04:04 +02:00
2014-12-31 22:33:51 +01:00
2015-10-04 01:37:31 +02:00
2014-11-13 15:31:19 +01:00
2014-09-25 13:45:30 +02:00
2015-10-17 18:38:52 +02:00
2014-03-11 21:05:34 +01:00
2015-02-14 21:07:40 +01:00
2014-10-26 03:22:52 +01:00
2015-05-11 01:56:11 +02:00
2014-08-08 00:48:38 +02:00
2014-07-03 21:42:16 +02:00
2014-08-30 15:50:22 +00:00
2013-11-10 16:06:16 +01:00
2015-08-25 12:07:38 +02:00
2014-04-19 04:25:01 +02:00
2014-08-08 00:48:38 +02:00
2015-02-26 02:06:10 +01:00
2015-07-27 23:15:19 +02:00
2014-08-08 00:48:38 +02:00
2015-09-15 18:02:47 +02:00
2015-09-02 00:59:10 +02:00
2015-03-15 13:45:31 +01:00
2014-12-04 20:24:00 +01:00
2015-07-12 15:22:37 +02:00
2015-02-14 21:07:40 +01:00
2015-06-25 12:45:09 +02:00
2014-06-18 14:55:28 +02:00
2015-10-09 22:09:08 +02:00
2015-07-27 22:10:35 +02:00
2014-09-24 19:17:55 +02:00
2015-09-07 16:11:57 +02:00
2015-02-14 21:07:40 +01:00
2015-02-14 21:07:40 +01:00
2015-07-27 23:15:19 +02:00
2013-10-13 09:37:21 +02:00
2015-10-04 13:23:42 +02:00
2014-06-01 14:16:29 +02:00
2015-05-11 15:31:55 +02:00
2014-06-01 14:16:29 +02:00
2014-12-15 15:49:00 +01:00
2015-06-12 22:55:49 +02:00
2015-10-12 05:36:39 +02:00
2015-06-14 15:09:33 +02:00
2015-09-20 02:14:18 +02:00
2015-09-29 15:22:52 +02:00
2014-06-18 19:49:17 +02:00
2015-08-20 12:22:50 +02:00
2015-09-15 18:02:47 +02:00
2015-10-17 12:56:47 +02:00
2015-02-14 21:07:40 +01:00
2015-08-10 04:45:27 +02:00
2014-03-09 22:59:46 +01:00
2015-02-14 21:07:40 +01:00
2015-02-14 21:07:40 +01:00
2015-02-20 20:14:56 +01:00
2013-12-21 13:52:10 +01:00
2013-11-09 01:12:10 +01:00
2014-05-07 03:42:21 +02:00
2015-05-30 03:57:20 +02:00
2015-06-08 00:35:43 +02:00
2015-08-24 13:04:38 +02:00
2014-03-10 23:38:01 +01:00
2013-11-01 17:33:05 +01:00
2015-10-15 15:04:00 +03:00
2015-10-03 23:52:19 +02:00
2015-01-23 22:27:48 +01:00
2014-04-16 01:37:38 +02:00
2015-09-09 02:23:38 +02:00
2014-10-20 04:31:46 +02:00
2015-10-07 00:10:16 +02:00
2015-04-06 14:44:33 +02:00
2014-11-15 11:30:42 +01:00
2015-09-24 23:35:10 +02:00
2014-08-28 14:34:55 +02:00
2015-01-05 20:52:51 +01:00
2015-07-27 23:15:19 +02:00
2014-04-19 04:25:01 +02:00
2014-07-04 00:50:40 +02:00
2015-05-12 18:40:16 +02:00
2014-08-24 11:05:42 +00:00
2014-02-03 02:04:38 +01:00
2015-09-25 21:25:08 +02:00
2014-09-11 15:34:13 +02:00
2014-09-11 15:16:24 +02:00
2015-09-07 02:48:58 +02:00
2015-09-07 02:48:58 +02:00
2015-10-04 12:15:16 -04:00
2015-09-08 17:10:48 +02:00
2015-08-23 04:16:02 +02:00
2015-07-26 04:00:02 +02:00
2015-05-26 19:54:41 +02:00
2015-10-05 12:44:05 +02:00
2015-10-09 21:18:28 -05:00
2015-02-14 21:07:40 +01:00
2015-07-12 13:56:50 +02:00
2015-09-29 15:22:52 +02:00
2015-07-27 23:15:19 +02:00
2015-09-03 11:28:29 +02:00
2014-08-11 14:29:56 +02:00
2013-11-06 11:57:48 +01:00
2014-08-29 18:57:25 +02:00
2015-06-13 09:28:41 +02:00
2015-05-31 19:04:52 +02:00
2015-01-23 17:45:35 +01:00
2015-06-24 00:25:24 +02:00
2015-06-24 00:44:09 +02:00
2014-09-25 13:51:43 +02:00
2014-05-04 00:19:35 +02:00
2014-07-13 19:18:31 +02:00
2014-07-13 19:18:31 +02:00
2015-09-10 21:40:07 +02:00
2014-08-15 22:47:45 +02:00
2014-08-08 00:48:38 +02:00
2015-02-14 21:07:40 +01:00
2014-10-17 12:51:49 +02:00
2015-10-20 09:41:11 +02:00
2015-04-08 12:36:53 +02:00
2015-09-20 20:08:01 +02:00
2015-10-09 04:43:49 +02:00
2015-10-05 11:12:12 +02:00
2015-09-29 15:22:52 +02:00
2014-01-17 23:09:52 +01:00
2014-08-08 00:48:38 +02:00
2015-09-10 21:40:07 +02:00
2015-10-03 22:40:27 +02:00
2015-07-12 15:22:37 +02:00
2015-02-14 21:07:40 +01:00
2015-02-14 21:07:40 +01:00
2015-03-22 03:52:37 +01:00
2015-04-20 03:19:47 +02:00
2015-04-20 03:19:47 +02:00
2015-05-31 13:05:12 +02:00
2015-10-13 19:41:07 -04:00
2015-09-29 15:22:52 +02:00
2015-08-18 08:50:22 +02:00
2015-02-25 00:48:50 +01:00
2015-10-20 12:17:21 +02:00
2014-12-02 15:28:22 +00:00
2015-07-27 23:15:19 +02:00
2015-07-27 15:24:59 +01:00
2015-09-21 13:43:32 +02:00
2014-08-26 14:05:07 +02:00
2015-08-27 18:07:43 +02:00
2015-09-29 13:45:23 +02:00
2014-08-11 13:46:53 +02:00
2015-10-17 15:02:40 -04:00
2015-03-15 13:39:56 +01:00
2015-07-09 00:11:32 +02:00
2015-09-21 02:30:29 +02:00
2015-09-10 21:40:07 +02:00
2015-09-10 21:40:07 +02:00
2015-10-20 09:40:08 +02:00
2015-06-29 16:29:07 +02:00
2015-02-11 02:47:54 +01:00
2015-09-29 15:22:52 +02:00
2015-02-20 20:41:35 +01:00
2015-07-27 15:24:59 +01:00
2015-09-05 00:09:13 +02:00
2015-07-22 10:23:18 +02:00
2015-09-05 00:11:14 +02:00
2015-09-09 02:49:49 +02:00
2015-09-05 16:50:09 +02:00
2014-08-08 00:48:38 +02:00
2015-08-01 00:58:31 +02:00
2015-08-01 00:58:31 +02:00
2014-08-08 00:48:38 +02:00
2015-04-21 02:19:07 +02:00
2015-10-14 13:48:22 +02:00
2015-06-24 14:45:00 +01:00
2015-06-15 21:41:20 +02:00
2015-07-27 15:24:59 +01:00
2015-07-25 18:39:17 +02:00
2015-02-14 21:07:40 +01:00
2015-07-29 23:22:12 +02:00
2014-12-18 23:27:07 +01:00
2015-08-27 04:28:21 +02:00
2015-07-27 15:24:59 +01:00
2015-07-09 03:46:37 +02:00
2015-07-27 15:24:59 +01:00
2015-07-27 23:15:19 +02:00
2015-07-27 15:24:59 +01:00
2014-05-01 17:26:06 +02:00
2015-07-27 15:24:59 +01:00
2015-07-27 23:15:19 +02:00
2015-09-12 13:05:01 +02:00
2014-12-19 04:36:45 +01:00
2013-09-30 02:15:36 +02:00
2013-09-30 02:15:36 +02:00
2015-10-05 22:31:38 +02:00
2014-06-18 17:28:10 +02:00
2015-09-17 11:36:16 -03:00
2015-07-03 21:02:50 +02:00
2014-12-22 12:03:34 +01:00
2014-12-20 00:49:47 +01:00
2015-02-14 21:07:40 +01:00
2015-02-11 02:47:54 +01:00
2014-05-22 15:15:04 +02:00
2015-09-10 21:40:07 +02:00
2014-08-08 00:48:38 +02:00
2015-09-05 16:50:09 +02:00
2015-02-14 21:07:40 +01:00
2015-06-21 09:30:01 +00:00
2015-09-29 15:22:52 +02:00
2015-10-15 01:11:17 +02:00
2015-01-05 01:45:49 +01:00
2015-09-29 21:36:18 +02:00
2015-09-17 11:36:16 -03:00
2013-10-29 11:06:32 +01:00
2015-09-10 21:40:07 +02:00
2015-07-27 23:15:19 +02:00
2015-01-27 18:16:42 +01:00
2014-04-17 21:45:58 +02:00
2015-10-03 12:22:41 +02:00
2015-09-16 14:03:13 +02:00
2015-09-16 14:03:13 +02:00
2015-09-12 14:39:28 +02:00
2015-07-27 15:24:59 +01:00
2014-12-06 00:48:47 +01:00
2015-09-05 16:50:09 +02:00
2015-06-07 21:55:46 +02:00
2015-02-06 16:07:16 +00:00
2015-10-18 14:17:14 +02:00
2014-06-18 17:28:10 +02:00
2015-07-29 22:09:16 +03:00
2015-05-29 11:32:07 +02:00
2015-06-01 11:29:05 +02:00
2015-06-01 11:29:05 +02:00
2013-11-18 16:02:50 +01:00
2015-09-01 13:35:37 +02:00
2014-06-01 23:56:22 +02:00
2015-10-14 22:55:55 +02:00
2015-02-25 00:58:39 +01:00
2015-02-25 00:03:52 +01:00
2015-06-08 23:05:01 +02:00
2015-02-25 00:58:39 +01:00
2015-03-05 10:05:44 +02:00
2015-02-25 00:58:39 +01:00
2015-02-25 00:58:39 +01:00
2015-02-24 22:34:08 +01:00
2015-07-27 23:15:19 +02:00
2015-07-27 23:15:19 +02:00
2015-02-24 23:44:25 +01:00
2015-03-31 01:11:02 +02:00
2015-07-27 23:15:19 +02:00
2015-03-04 11:31:55 +01:00
2015-07-27 15:24:59 +01:00
2015-02-24 22:34:08 +01:00
2015-02-25 00:58:39 +01:00
2015-02-24 22:55:20 +01:00
2015-07-27 15:24:59 +01:00
2015-07-27 23:15:19 +02:00
2015-07-27 15:24:59 +01:00
2015-02-25 00:58:39 +01:00
2015-03-11 20:28:45 +01:00
2015-07-27 23:15:19 +02:00
2015-09-17 11:01:16 +02:00
2015-09-16 14:07:05 +02:00
2015-03-01 01:31:49 +01:00
2015-03-01 01:31:49 +01:00
2015-08-23 23:35:38 +02:00
2014-12-19 13:25:51 +01:00
2014-09-22 03:45:34 +02:00
2015-02-24 23:30:51 +01:00
2015-07-20 00:27:52 +02:00
2015-03-10 11:17:37 +01:00
2015-03-01 01:31:49 +01:00
2015-06-03 22:39:27 +02:00
2015-02-24 23:30:51 +01:00
2015-04-11 18:53:54 +02:00
2015-09-16 14:11:24 +02:00
2015-04-01 21:34:20 +02:00
2014-10-21 03:51:14 +02:00
2015-05-27 21:48:47 +02:00
2014-10-21 03:52:27 +02:00
2015-09-10 21:40:07 +02:00
2014-10-24 19:23:23 +02:00
2015-01-09 13:39:48 +01:00
2015-06-02 16:42:33 +02:00
2015-06-08 22:35:53 +02:00
2015-09-15 18:02:43 +02:00
2014-02-26 17:46:45 +00:00
2015-04-23 12:56:31 +02:00
2015-06-24 14:45:09 +01:00
2015-08-28 00:09:56 +02:00
2015-10-03 21:48:16 +02:00
2015-07-27 15:24:59 +01:00
2015-03-09 21:05:29 +01:00
2015-07-27 15:24:59 +01:00
2014-08-08 00:48:38 +02:00
2015-09-15 18:02:43 +02:00
2015-07-27 15:24:59 +01:00
2014-11-24 13:10:16 +01:00
2015-02-14 21:07:40 +01:00
2014-08-08 00:48:38 +02:00
2015-07-27 23:15:19 +02:00
2015-10-09 10:53:21 +02:00
2015-09-29 15:22:52 +02:00
2014-12-18 19:59:03 +01:00
2015-09-10 21:40:07 +02:00
2014-03-08 12:36:57 +01:00
2015-09-21 13:42:48 +02:00
2015-09-21 13:42:48 +02:00
2015-09-10 21:40:07 +02:00
2015-09-10 21:40:07 +02:00
2014-09-26 10:35:14 +02:00
2015-10-16 16:37:41 +02:00
2014-06-18 19:49:17 +02:00
2015-09-03 10:20:29 +02:00
2015-05-24 13:32:53 +02:00
2015-07-27 23:15:19 +02:00
2015-09-11 21:44:30 +02:00
2015-09-10 21:40:07 +02:00
2015-10-12 16:56:58 +02:00
2015-02-06 09:42:53 +00:00
2014-10-07 13:46:29 +02:00
2015-08-13 02:24:37 +02:00
2015-05-27 22:24:00 +02:00
2015-10-04 23:14:19 +02:00
2015-06-08 14:08:52 +02:00
2015-06-08 14:08:52 +02:00
2014-08-08 00:48:38 +02:00
2015-07-27 15:24:59 +01:00
2015-02-14 21:07:40 +01:00
2014-08-08 00:48:38 +02:00
2015-10-04 12:15:16 -04:00
2014-02-11 10:29:02 +01:00
2015-04-09 20:58:11 +02:00
2015-05-11 03:50:01 +02:00
2015-08-01 00:58:31 +02:00
2015-10-03 12:10:03 +02:00
2015-10-18 20:43:02 +02:00
2015-10-14 16:40:57 +02:00
2014-08-08 00:48:38 +02:00
2015-10-20 09:41:11 +02:00
2014-08-08 00:48:38 +02:00
2015-01-11 00:35:01 +01:00
2015-01-11 00:35:01 +01:00
2014-06-18 17:28:10 +02:00
2015-05-11 15:56:16 +02:00
2015-05-11 15:56:16 +02:00
2015-09-10 21:40:07 +02:00
2015-09-15 18:02:43 +02:00
2015-09-11 15:41:18 +00:00
2015-09-11 15:34:17 +00:00
2014-08-24 11:05:42 +00:00
2015-06-09 21:19:57 +02:00
2015-08-20 21:03:08 +02:00
2015-05-22 00:17:53 +02:00
2015-10-12 22:16:12 +02:00
2015-09-12 02:17:41 +02:00
2014-12-20 01:51:16 +01:00
2015-07-27 15:24:59 +01:00
2013-12-23 19:43:09 +01:00
2013-12-23 19:43:09 +01:00
2015-07-12 15:22:37 +02:00
2015-04-11 13:50:50 +02:00
2015-04-24 03:43:56 +02:00
2015-10-20 09:41:11 +02:00
2015-07-27 15:24:59 +01:00
2015-07-27 15:24:59 +01:00
2015-09-05 16:50:09 +02:00
2015-07-11 14:46:19 +02:00
2015-07-12 00:00:21 +02:00
2015-10-14 13:44:33 +02:00