projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41b4421
)
src/io/source_avcodec.c: make sure seek position is >= 0
author
Paul Brossier
<piem@piem.org>
Sun, 26 Feb 2017 22:37:22 +0000
(23:37 +0100)
committer
Paul Brossier
<piem@piem.org>
Sun, 26 Feb 2017 22:37:22 +0000
(23:37 +0100)
src/io/source_avcodec.c
patch
|
blob
|
history
diff --git
a/src/io/source_avcodec.c
b/src/io/source_avcodec.c
index
4f9e25c
..
4ed6499
100644
(file)
--- a/
src/io/source_avcodec.c
+++ b/
src/io/source_avcodec.c
@@
-484,6
+484,11
@@
uint_t aubio_source_avcodec_seek (aubio_source_avcodec_t * s, uint_t pos) {
AUBIO_ERR("source_avcodec: failed seeking in %s (file not opened?)", s->path);
return ret;
}
+ if ((sint_t)pos < 0) {
+ AUBIO_ERR("source_avcodec: could not seek %s at %d (seeking position"
+ " should be >= 0)\n", s->path, pos);
+ return AUBIO_FAIL;
+ }
ret = avformat_seek_file(s->avFormatCtx, s->selected_stream,
min_ts, resampled_pos, max_ts, seek_flags);
if (ret < 0) {