From 3b3edd4f168ed8ff08042366007edb61b7167384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 14 Apr 2009 15:15:59 +0000 Subject: when ov_open() fails, terminate the opening-process andset x_fd to -1 (should fix #1966294) svn path=/trunk/externals/pdogg/; revision=11022 --- oggread~/oggread~.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.1