./vorbis-tools r38: * Add upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff.
Clint Adams
schizo at debian.org
Sat May 31 14:25:27 UTC 2008
------------------------------------------------------------
revno: 38
committer: Clint Adams <schizo at debian.org>
branch nick: vorbis-tools
timestamp: Sat 2008-05-31 10:25:27 -0400
message:
* Add upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff.
closes: #478991.
added:
debian/patches/upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff
modified:
debian/changelog
debian/patches/series
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-05-22 23:51:34 +0000
+++ b/debian/changelog 2008-05-31 14:25:27 +0000
@@ -1,3 +1,10 @@
+vorbis-tools (1.2.0-4) unstable; urgency=low
+
+ * Add upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff.
+ closes: #478991.
+
+ -- Clint Adams <schizo at debian.org> Sat, 31 May 2008 10:23:45 -0400
+
vorbis-tools (1.2.0-3) unstable; urgency=medium
* Drop for_upstream-mention_alsa09_in_ogg123.1.diff. closes: #482347.
=== modified file 'debian/patches/series'
--- a/debian/patches/series 2008-05-22 23:51:34 +0000
+++ b/debian/patches/series 2008-05-31 14:25:27 +0000
@@ -1,4 +1,5 @@
upstream_r14728-speex_format_validation.diff
+upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff -p2
for_upstream-manpage_typos.diff
no_debian_subdir.diff
no_fast-math.diff
=== added file 'debian/patches/upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff'
--- a/debian/patches/upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff 1970-01-01 00:00:00 +0000
+++ b/debian/patches/upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff 2008-05-31 14:25:27 +0000
@@ -0,0 +1,242 @@
+Index: /trunk/vorbis-tools/ogg123/ogg123.c
+===================================================================
+--- /trunk/vorbis-tools/ogg123/ogg123.c (revision 14207)
++++ /trunk/vorbis-tools/ogg123/ogg123.c (revision 14957)
+@@ -240,8 +240,8 @@
+
+ options->seekmode = DECODER_SEEK_NONE;
+-
++
+ return 1;
+ }
+-
++
+ /* This function selects which statistics to display for our
+ particular configuration. This does not have anything to do with
+@@ -272,5 +272,5 @@
+ }
+ free(data_source_stats);
+-
++
+ /* Assume we need total time display, and let display_statistics()
+ determine at what point it should be turned off during playback */
+@@ -295,5 +295,5 @@
+
+ if (options.remote) {
+-
++
+ /* Display statistics via the remote interface */
+ remote_time(pstats_arg->decoder_statistics->current_time,
+@@ -302,5 +302,5 @@
+
+ } else {
+-
++
+ /* Disable/Enable statistics as needed */
+
+@@ -448,6 +448,6 @@
+ print_audio_devices_info(options.devices);
+
+-
+- /* Setup buffer */
++
++ /* Setup buffer */
+ if (options.buffer_size > 0) {
+ /* Keep sample size alignment for surround sound with up to 10 channels */
+@@ -474,5 +474,4 @@
+
+ if (options.remote) {
+-
+ /* run the mainloop for the remote interface */
+ remote_mainloop();
+@@ -484,7 +483,7 @@
+ if (options.shuffle) {
+ int i;
+-
++
+ srandom(time(NULL));
+-
++
+ for (i = 0; i < items; i++) {
+ int j = i + random() % (items - i);
+@@ -569,5 +568,5 @@
+ return;
+ }
+-
++
+ if ( (decoder = format->init(source, &options, &new_audio_fmt,
+ &decoder_callbacks,
+@@ -587,5 +586,5 @@
+ /* Start the audio playback thread before we begin sending data */
+ if (audio_buffer != NULL) {
+-
++
+ /* First reset mutexes and other synchronization variables */
+ buffer_reset (audio_buffer);
+@@ -615,9 +614,9 @@
+ /* Main loop: Iterates over all of the logical bitstreams in the file */
+ while (!eof && !sig_request.exit) {
+-
++
+ /* Loop through data within a logical bitstream */
+ eos = 0;
+ while (!eos && !sig_request.exit) {
+-
++
+ /* Check signals */
+ if (sig_request.skipfile) {
+@@ -665,5 +664,4 @@
+ }
+
+-
+ /* Check to see if the audio format has changed */
+ if (!audio_format_equal(&new_audio_fmt, &old_audio_fmt)) {
+@@ -683,5 +681,5 @@
+ audio_reopen_action(NULL, reopen_arg);
+ }
+-
++
+
+ /* Update statistics display if needed */
+@@ -703,9 +701,13 @@
+
+ if (nthc-- == 0) {
+- if (audio_buffer)
+- buffer_submit_data(audio_buffer, convbuffer, ret);
+- else
++ if (audio_buffer) {
++ if (!buffer_submit_data(audio_buffer, convbuffer, ret)) {
++ status_error(_("Error: buffer write failed.\n"));
++ eof = eos = 1;
++ break;
++ }
++ } else
+ audio_play_callback(convbuffer, ret, eos, &audio_play_arg);
+-
++
+ nthc = options.nth - 1;
+ }
+@@ -715,13 +717,13 @@
+
+ ntimesc = 0;
+-
++
+ } /* End of data loop */
+-
++
+ } /* End of logical bitstream loop */
+-
++
+ /* Done playing this logical bitstream. Clean up house. */
+
+ if (audio_buffer) {
+-
++
+ if (!sig_request.exit && !sig_request.skipfile) {
+ buffer_mark_eos(audio_buffer);
+@@ -734,6 +736,5 @@
+ /* Print final stats */
+ display_statistics_quick(stat_format, audio_buffer, source, decoder);
+-
+-
++
+ format->cleanup(decoder);
+ transport->close(source);
+@@ -741,5 +742,5 @@
+
+ status_message(1, _("Done."));
+-
++
+ if (sig_request.exit)
+ exit (exit_status);
+@@ -749,5 +750,5 @@
+ void exit_cleanup ()
+ {
+-
++
+ if (audio_buffer != NULL) {
+ buffer_destroy (audio_buffer);
+Index: /trunk/vorbis-tools/ogg123/buffer.c
+===================================================================
+--- /trunk/vorbis-tools/ogg123/buffer.c (revision 14422)
++++ /trunk/vorbis-tools/ogg123/buffer.c (revision 14957)
+@@ -208,5 +208,5 @@
+ /* This test is safe since curfill will never decrease and eos will
+ never be unset. */
+- while ( !(buf->eos && buf->curfill == 0)) {
++ while ( !(buf->eos && buf->curfill == 0) && !buf->abort_write) {
+
+ if (buf->cancel_flag || sig_request.cancel)
+@@ -252,4 +252,9 @@
+ buf->write_arg);
+
++ if (!write_amount) {
++ DEBUG("Error writing to the audio device. Aborting.");
++ buffer_abort_write(buf);
++ }
++
+ LOCK_MUTEX(buf->mutex);
+
+@@ -279,5 +284,5 @@
+
+
+-void submit_data_chunk (buf_t *buf, char *data, size_t size)
++int submit_data_chunk (buf_t *buf, char *data, size_t size)
+ {
+ long buf_write_pos; /* offset of first available write location */
+@@ -342,4 +347,5 @@
+
+ DEBUG("Exit submit_data_chunk");
++ return !buf->abort_write;
+ }
+
+@@ -516,6 +522,6 @@
+ /* --- Data buffering functions --- */
+
+-void buffer_submit_data (buf_t *buf, char *data, long nbytes) {
+- submit_data_chunk (buf, data, nbytes);
++int buffer_submit_data (buf_t *buf, char *data, long nbytes) {
++ return submit_data_chunk (buf, data, nbytes);
+ }
+
+@@ -747,5 +753,5 @@
+
+ LOCK_MUTEX(buf->mutex);
+- while (!empty) {
++ while (!empty && !buf->abort_write) {
+
+ if (buf->curfill > 0) {
+Index: /trunk/vorbis-tools/ogg123/buffer.h
+===================================================================
+--- /trunk/vorbis-tools/ogg123/buffer.h (revision 8422)
++++ /trunk/vorbis-tools/ogg123/buffer.h (revision 14957)
+@@ -111,5 +111,5 @@
+
+ /* --- Data buffering functions --- */
+-void buffer_submit_data (buf_t *buf, char *data, long nbytes);
++int buffer_submit_data (buf_t *buf, char *data, long nbytes);
+ size_t buffer_get_data (buf_t *buf, char *data, long nbytes);
+
+Index: /trunk/vorbis-tools/ogg123/http_transport.c
+===================================================================
+--- /trunk/vorbis-tools/ogg123/http_transport.c (revision 14516)
++++ /trunk/vorbis-tools/ogg123/http_transport.c (revision 14957)
+@@ -69,5 +69,6 @@
+ return 0;
+
+- buffer_submit_data(myarg->buf, ptr, size*nmemb);
++ if (!buffer_submit_data(myarg->buf, ptr, size*nmemb))
++ return 0;
+
+ if (myarg->cancel_flag || sig_request.cancel)
+Index: /trunk/vorbis-tools/CHANGES
+===================================================================
+--- /trunk/vorbis-tools/CHANGES (revision 14933)
++++ /trunk/vorbis-tools/CHANGES (revision 14957)
+@@ -4,4 +4,6 @@
+ * Corrected problems in the Visual Studio project files
+ * ogg123: backported fix from libfishsound to patch the Speex decoder (#1347)
++* ogg123: fixed CPU issue when outputting to a closed pipe (#1357)
++* ogg123: return value to stop decoding after buffer is shut down (#1357)
+ * oggenc: fixed a core dump while resampling from FLAC (#1316)
+ * oggenc: fixed a typo in the Skeleton handling routine
More information about the pkg-xiph-commits
mailing list