File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -556,9 +556,10 @@ class ID3v2Parser extends TagParser {
556556 }
557557
558558 Picture getPicture (Uint8List content) {
559- var offset = 1 ;
559+ int offset = 0 ;
560560
561561 final reader = ByteData .sublistView (content);
562+ final encoding = reader.getUint8 (offset++ );
562563
563564 final mimetype = [reader.getUint8 (offset++ )];
564565
@@ -572,13 +573,16 @@ class ID3v2Parser extends TagParser {
572573
573574 offset++ ;
574575
575- final description = [reader.getUint8 (offset)];
576- offset += 1 ;
576+ final description = [reader.getInt8 (offset++ )];
577577
578578 while (description.last != 0 ) {
579- final a = reader.getUint8 (offset);
580- description.add (a);
581- offset++ ;
579+ description.add (reader.getInt8 (offset++ ));
580+ }
581+
582+ if (encoding == 1 || encoding == 2 ) {
583+ while (reader.getInt8 (offset) == 0 ) {
584+ offset++ ;
585+ }
582586 }
583587
584588 return Picture (
You can’t perform that action at this time.
0 commit comments