KILL E_AO_WRITE.
authorAndre Noll <maan@systemlinux.org>
Thu, 31 Mar 2011 09:27:49 +0000 (11:27 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 21 Apr 2011 11:28:43 +0000 (13:28 +0200)
We have E_WRITE_COMMON_EOF, and use of this code is preferred because
para_write treats it as a non-fatal error and exits successfully if
the writer task removed its btr node due to E_WRITER_COMMON_EOF while
it exits non-zero in case of other errors.

ao_write.c
error.h

index 307588f..bb60e19 100644 (file)
@@ -210,7 +210,7 @@ __noreturn static void *aow_play(void *priv)
                                if (frames > 0)
                                        break;
                                /* eof and less than a single frame available */
-                               ret = -E_AO_EOF;
+                               ret = -E_WRITE_COMMON_EOF;
                                goto unlock;
                        }
                        //PARA_CRIT_LOG("waiting for data\n");
diff --git a/error.h b/error.h
index 26e6fe0..b8b0074 100644 (file)
--- a/error.h
+++ b/error.h
@@ -112,7 +112,6 @@ extern const char **para_errlist[];
        PARA_ERROR(AO_APPEND_OPTION, "ao append option: memory allocation failure"), \
        PARA_ERROR(AO_OPEN_LIVE, "ao: could not open audio device"), \
        PARA_ERROR(AO_FILE_NOT_SUPP, "ao: file io drivers not supported"), \
-       PARA_ERROR(AO_EOF, "ao: end of file"), \
        PARA_ERROR(AO_PLAY, "ao_play() failed"), \
        PARA_ERROR(AO_BAD_SAMPLE_FORMAT, "ao: unsigned sample formats not supported"), \
        PARA_ERROR(AO_PTHREAD, "pthread error"), \