diff options
Diffstat (limited to 'libswresample')
-rw-r--r-- | libswresample/swresample.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 6f1c41bc5c..19423024ba 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -818,6 +818,13 @@ int swr_inject_silence(struct SwrContext *s, int count){ if(count <= 0) return 0; +#define MAX_SILENCE_STEP 16384 + while (count > MAX_SILENCE_STEP) { + if ((ret = swr_inject_silence(s, MAX_SILENCE_STEP)) < 0) + return ret; + count -= MAX_SILENCE_STEP; + } + if((ret=swri_realloc_audio(&s->silence, count))<0) return ret; |