[tracker-miners] extract/mp3: Check for experimental flag right after fetching flags
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners] extract/mp3: Check for experimental flag right after fetching flags
- Date: Tue, 22 Aug 2017 16:46:44 +0000 (UTC)
commit d7643dbc7b2c00a5b136ea16e31052f0f6506837
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Aug 13 12:39:31 2017 +0200
extract/mp3: Check for experimental flag right after fetching flags
No need to do further operations here if the experimental flag is
enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=786539
src/tracker-extract/tracker-extract-mp3.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 999a6cf..83bbd1d 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1835,6 +1835,12 @@ parse_id3v24 (const gchar *data,
ext_header = (data[5] & 0x40) > 0;
experimental = (data[5] & 0x20) > 0;
+ /* We don't handle experimental cases */
+ if (experimental) {
+ g_message ("[v24] Experimental MP3s are not extracted, doing nothing");
+ return;
+ }
+
/* Get the complete tag size (zz) in the header:
* Tag size is size of the complete tag after
* unsychronisation, including padding, excluding the header
@@ -1842,12 +1848,6 @@ parse_id3v24 (const gchar *data,
*/
tsize = extract_uint32_7bit (&data[6]);
- /* We don't handle experimental cases */
- if (experimental) {
- g_message ("[v24] Experimental MP3s are not extracted, doing nothing");
- return;
- }
-
/* Check if we can read even the first frame, The complete
* tag size (tsize) does not include the header which is 10
* bytes, so we check that there is some content AFTER the
@@ -2037,6 +2037,12 @@ parse_id3v23 (const gchar *data,
ext_header = (data[5] & 0x40) > 0;
experimental = (data[5] & 0x20) > 0;
+ /* We don't handle experimental cases */
+ if (experimental) {
+ g_message ("[v23] Experimental MP3s are not extracted, doing nothing");
+ return;
+ }
+
/* Get the complete tag size (zz) in the header:
* Tag size is size of the complete tag after
* unsychronisation, including padding, excluding the header
@@ -2044,12 +2050,6 @@ parse_id3v23 (const gchar *data,
*/
tsize = extract_uint32_7bit (&data[6]);
- /* We don't handle experimental cases */
- if (experimental) {
- g_message ("[v23] Experimental MP3s are not extracted, doing nothing");
- return;
- }
-
/* Check if we can read even the first frame, The complete
* tag size (tsize) does not include the header which is 10
* bytes, so we check that there is some content AFTER the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]