Merge branch 'v0.17.x'

This commit is contained in:
Max Kellermann
2012-10-02 00:36:05 +02:00
8 changed files with 130 additions and 145 deletions

View File

@@ -99,14 +99,15 @@ int main(int argc, char **argv)
}
}
ret = encoder_open(encoder, &audio_format, &error);
if (encoder == NULL) {
if (!encoder_open(encoder, &audio_format, &error)) {
g_printerr("Failed to open encoder: %s\n",
error->message);
g_error_free(error);
return 1;
}
encoder_to_stdout(encoder);
/* do it */
while ((nbytes = read(0, buffer, sizeof(buffer))) > 0) {

View File

@@ -67,6 +67,8 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
success = encoder_open(encoder, &audio_format, NULL);
assert(success);
encoder_to_stdout(encoder);
/* write a block of data */
success = encoder_write(encoder, zero, sizeof(zero), NULL);