aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-04-14 15:15:59 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-04-14 15:15:59 +0000
commit3b3edd4f168ed8ff08042366007edb61b7167384 (patch)
tree20ed7ac51b2fa4b7f69ca768ac0dd3ce6b9a7e2c
parentdf4c70d38c075e40f7f1a91dd5a349ff78f366d0 (diff)
when ov_open() fails, terminate the opening-process andset x_fd to -1 (should fix #1966294)
svn path=/trunk/externals/pdogg/; revision=11022
-rw-r--r--oggread~/oggread~.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/oggread~/oggread~.c b/oggread~/oggread~.c
index 7c8bf37..435d0e9 100644
--- a/oggread~/oggread~.c
+++ b/oggread~/oggread~.c
@@ -317,6 +317,9 @@ static void oggread_open(t_oggread *x, t_symbol *filename)
post("oggread~: error: could not open \"%s\" as an OggVorbis file", filename->s_name);
ov_clear(&x->x_ov);
post("oggread~: file closed due to error");
+ x->x_fd=-1;
+ x->x_eos=1;
+ return;
}
/* print details about each logical bitstream in the input */
@@ -328,7 +331,7 @@ static void oggread_open(t_oggread *x, t_symbol *filename)
}
else
{
- post("oggread~: file \"%s\" was not seekable"
+ post("oggread~: file \"%s\" was not seekable\n"
"oggread~: first logical bitstream information:", filename->s_name);
}