projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a81b12a
)
src/io/source_avcodec.c: give up reading file if number of channel changes during...
author
Paul Brossier
<piem@piem.org>
Mon, 6 Aug 2018 13:54:37 +0000
(15:54 +0200)
committer
Paul Brossier
<piem@piem.org>
Mon, 6 Aug 2018 13:54:37 +0000
(15:54 +0200)
src/io/source_avcodec.c
patch
|
blob
|
history
diff --git
a/src/io/source_avcodec.c
b/src/io/source_avcodec.c
index
6d8efa7
..
7082bc2
100644
(file)
--- a/
src/io/source_avcodec.c
+++ b/
src/io/source_avcodec.c
@@
-425,6
+425,13
@@
void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_sam
goto beach;
}
+ if (avFrame->channels != (sint_t)s->input_channels) {
+ AUBIO_WRN ("source_avcodec: trying to read from %d channel(s),"
+ "but configured for %d; is '%s' corrupt?\n", avFrame->channels,
+ s->input_channels, s->path);
+ goto beach;
+ }
+
#ifdef HAVE_AVRESAMPLE
in_linesize = 0;
av_samples_get_buffer_size(&in_linesize, avCodecCtx->channels,