fn load_second_audio_packet(&mut self) -> Result<(), VorbisError> {
		let second_packet = try!(read_expected_packet_with_stream_serial(&mut self.rdr, self.stream_serial));

		// The spec requires that the third audio packet will start in a fresh page,
		// and determine how many leading samples to drop.
		// However, some real-world ogg files does not seem to obey this.
		// In such case, we don't do such adjustment.
		if second_packet.last_in_page() {
			let second_packet_sample_count =
				try!(get_decoded_sample_count(&self.ident_hdr, &self.setup_hdr, &second_packet.data)) as u64;

			let skip_count = second_packet_sample_count.saturating_sub(second_packet.absgp_page());
			let start_absgp = second_packet.absgp_page().saturating_sub(second_packet_sample_count);
			assert_eq!(start_absgp + skip_count + second_packet_sample_count, second_packet.absgp_page());

			self.skip_count = skip_count;
			self.start_absgp = start_absgp;
			self.cur_absgp = start_absgp;
		}
		self.next_packet = Some(second_packet);

		Ok(())
	}
/// Read the second packet in a logical stream and adjust skip_count.
/// The second packet must exist.
Read the second packet in a logical stream and adjust skip_count.
The second packet must exist.
Read the second packet in a logical stream and adjust skip_count . The second packet must exist .
fn load_second_audio_packet(&mut self) -> Result<(), VorbisError> {
		let second_packet = try!(read_expected_packet_with_stream_serial(&mut self.rdr, self.stream_serial));
		// The spec requires that the third audio packet will start in a fresh page,
		// and determine how many leading samples to drop.
		// However, some real-world ogg files does not seem to obey this.
		// In such case, we don't do such adjustment.
		if second_packet.last_in_page() {
			let second_packet_sample_count =
				try!(get_decoded_sample_count(&self.ident_hdr, &self.setup_hdr, &second_packet.data)) as u64;
			let skip_count = second_packet_sample_count.saturating_sub(second_packet.absgp_page());
			let start_absgp = second_packet.absgp_page().saturating_sub(second_packet_sample_count);
			assert_eq!(start_absgp + skip_count + second_packet_sample_count, second_packet.absgp_page());
			self.skip_count = skip_count;
			self.start_absgp = start_absgp;
			self.cur_absgp = start_absgp;
		}
		self.next_packet = Some(second_packet);
		Ok(())
	}
fn load_second_audio_packet ( & mut self ) -> Result < ( ) , VorbisError > { let second_packet = try ! ( read_expected_packet_with_stream_serial ( mut self rdr self stream_serial ) ) ; // The spec requires that the third audio packet will start in a fresh page, // and determine how many leading samples to drop. // However, some real-world ogg files does not seem to obey this. // In such case, we don't do such adjustment. if second_packet . last_in_page ( ) { let second_packet_sample_count = try ! ( get_decoded_sample_count ( self ident_hdr self setup_hdr second_packet data ) ) as u64 ; let skip_count = second_packet_sample_count . saturating_sub ( second_packet . absgp_page ( ) ) ; let start_absgp = second_packet . absgp_page ( ) . saturating_sub ( second_packet_sample_count ) ; assert_eq ! ( start_absgp skip_count second_packet_sample_count second_packet absgp_page ( ) ) ; self . skip_count = skip_count ; self . start_absgp = start_absgp ; self . cur_absgp = start_absgp ; } self . next_packet = Some ( second_packet ) ; Ok ( ( ) ) }
Read the second packet in a logical stream and adjust skip_count.
Read the second packet in a logical stream and adjust skip_count .
&mut self
&mut self