Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Howto: how to play back vdr recodings with AC3 sound.
Carsten Koch wrote:
....
> Step 6: Install the specially patched ac3dec tool.
....
> 3) patch ac3dec so it does not mute anything before it has actually
> received the first data block.
I have made some improvements to the patch, so now ac3dec
no longer crashes when it does not find any AC3 data:
--- ac3dec.c-original Wed Aug 8 20:49:04 2001
+++ ac3dec.c Fri Aug 10 02:36:30 2001
@@ -208,21 +208,26 @@
//Send the samples to the output device
output_play(ac3_frame->audio_data, 256 * 6);
} while((ac3_frame = ac3_decode_frame()));
+ output_close();
} else {
uint_8 *start, *end;
init_spdif();
- if (output_open(&out_config) < 0) {
- fprintf(stderr, "Output open failed\n");
- exit(EXIT_FAILURE);
+ if (fill_buffer(&start, &end) > 0)
+ {
+ if (output_open(&out_config) < 0) {
+ fprintf(stderr, "Output open failed\n");
+ exit(EXIT_FAILURE);
+ }
+ signal(SIGINT, ac3dec_signal_handler);
+ signal(SIGTERM, ac3dec_signal_handler);
+ signal(SIGABRT, ac3dec_signal_handler);
+ if (output_spdif(start, end, quiet) >= 0)
+ while (fill_buffer(&start, &end) > 0)
+ if (output_spdif(start, end, quiet) < 0)
+ break;
+ output_close();
}
- signal(SIGINT, ac3dec_signal_handler);
- signal(SIGTERM, ac3dec_signal_handler);
- signal(SIGABRT, ac3dec_signal_handler);
- while (fill_buffer(&start, &end) > 0)
- if (output_spdif(start, end, quiet) < 0)
- break;
}
- output_close();
fclose(in_file);
}
return EXIT_SUCCESS;
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index