mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-28 13:40:55 +00:00
asyncts: reset delta to 0 when it's not used.
Fixes an invalid write.
This commit is contained in:
parent
713548cbad
commit
f297dd3812
@ -182,10 +182,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
|
||||
if (labs(delta) > s->min_delta) {
|
||||
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
|
||||
out_size += delta;
|
||||
} else if (s->resample) {
|
||||
int comp = av_clip(delta, -s->max_comp, s->max_comp);
|
||||
av_log(ctx, AV_LOG_VERBOSE, "Compensating %d samples per second.\n", comp);
|
||||
avresample_set_compensation(s->avr, delta, inlink->sample_rate);
|
||||
} else {
|
||||
if (s->resample) {
|
||||
int comp = av_clip(delta, -s->max_comp, s->max_comp);
|
||||
av_log(ctx, AV_LOG_VERBOSE, "Compensating %d samples per second.\n", comp);
|
||||
avresample_set_compensation(s->avr, delta, inlink->sample_rate);
|
||||
}
|
||||
delta = 0;
|
||||
}
|
||||
|
||||
if (out_size > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user