Browse Source

aac incorrect synchro at the beginnign of a block locks the decoder

philippe44 5 years ago
parent
commit
811b132aa3
2 changed files with 5 additions and 5 deletions
  1. 3 2
      components/squeezelite/helix-aac.c
  2. 2 3
      components/squeezelite/output_i2s.c

+ 3 - 2
components/squeezelite/helix-aac.c

@@ -370,8 +370,8 @@ static decode_state helixaac_decode(void) {
 					channels = info.nChans;
 					samplerate = info.sampRateOut;
 					found = 1;
-				} 
-				
+				} else if (n == 0) n++;
+					
 				HAAC(a, FlushCodec, a->hAac);
 			
 				bytes_total -= n;
@@ -412,6 +412,7 @@ static decode_state helixaac_decode(void) {
 
 			// not finished header parsing come back next time
 			UNLOCK_S;
+			LOG_INFO("header not found yet");
 			return DECODE_RUNNING;
 		}
 	}

+ 2 - 3
components/squeezelite/output_i2s.c

@@ -280,9 +280,8 @@ static void *output_thread_i2s() {
 			SET_MIN_MAX( TIME_MEASUREMENT_GET(timer_start),i2s_time);
 			
 			frames = 0;
-		} else {
-			LOG_WARN("no frame returned %d", output.state);
-		}
+		} 
+		
 	}
 	
 	return 0;