Roman Beranek
2021-Jul-15 04:40 UTC
[opus] [PATCH] opusenc: ignore SSND chunk length when input is stdin
--- src/audio-in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio-in.c b/src/audio-in.c index 5bb4ac4..56bc0c5 100644 --- a/src/audio-in.c +++ b/src/audio-in.c @@ -402,7 +402,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) return 0; /* No SSND chunk -> no actual audio */ } - if (len < 8) + if (len < 8 && in != stdin) { fprintf(stderr, _("ERROR: Corrupted SSND chunk in AIFF header\n")); return 0; -- 2.32.0
Ralph Giles
2021-Jul-17 19:08 UTC
[opus] [PATCH] opusenc: ignore SSND chunk length when input is stdin
Thanks for the patch. You don't say why you want to make this change. Can you offer some motivation? Is there some conventional value which could be checked for streamed input instead of just assuming everything until EOF is valid audio data? -r On Thu, 2021-07-15 at 06:40 +0200, Roman Beranek wrote:> --- > ?src/audio-in.c | 2 +- > ?1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/audio-in.c b/src/audio-in.c > index 5bb4ac4..56bc0c5 100644 > --- a/src/audio-in.c > +++ b/src/audio-in.c > @@ -402,7 +402,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned > char *buf, int buflen) > ???????? return 0; /* No SSND chunk -> no actual audio */ > ???? } > ? > -??? if (len < 8) > +??? if (len < 8 && in != stdin) > ???? { > ???????? fprintf(stderr, _("ERROR: Corrupted SSND chunk in AIFF > header\n")); > ???????? return 0;