} else if (config.decoder_in_use == 1 << decoder_ffmpeg_alac) {
#ifdef CONFIG_FFMPEG
prepare_decoding_chain(conn, ALAC_44100_S16_2);
- if (len > 8) {
+ // if (len > 8) {
abuf->avframe = block_to_avframe(conn, data_to_use, len);
abuf->ssrc = ALAC_44100_S16_2;
if (abuf->avframe) {
av_frame_free(&abuf->avframe);
abuf->avframe = NULL;
}
- } else {
- debug(1,
- "Unrecognised audio packet of length %u -- replacing with %u frames of silence.",
- len, conn->frames_per_packet);
- abuf->length = conn->frames_per_packet;
- abuf->avframe = NULL;
+ // } else {
+ if (len <= 8) {
+ debug(1,
+ "Using the FFMPEG ALAC_44100_S16_2 decoder, a short audio packet %u, rtptime %u, of length %u has been decoded. Contents follow:", seqno,
+ actual_timestamp, len);
+ debug_print_buffer(1, data, len);
+ // abuf->length = conn->frames_per_packet;
+ // abuf->avframe = NULL;
}
#else
debug(1, "FFMPEG support has not been built into this version Shairport Sync!");
prepare_decoding_chain(conn, ssrc); // dynamically set the decoding environment
- if (len > 8) {
+ // if (len > 8) {
abuf->avframe = block_to_avframe(conn, data, len);
abuf->ssrc = ssrc; // tag the avframe with its specific SSRC
if (abuf->avframe) {
av_frame_free(&abuf->avframe);
abuf->avframe = NULL;
}
- } else {
+ //} else {
+ if (len <= 8) {
debug(1,
- "Unrecognised audio packet %u, rtptime %u, of length %u. Contents follow:", seqno,
+ "Using an FFMPEG decoder, a short audio packet %u, rtptime %u, of length %u has been decoded. Contents follow:", seqno,
actual_timestamp, len);
debug_print_buffer(1, data, len);
- abuf->length = 0;
- abuf->avframe = NULL;
+ // abuf->length = 0;
+ // abuf->avframe = NULL;
}
abuf->ready = 1;
abuf->status = 0; // signifying that it was received