mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-01 07:00:40 +00:00
lavfi/showwaves: do not set on outlink->out_buf the sent video frame
The video frame reference is passed along the filterchain, and is not possessed anymore by the filter. If out_buf is not set to NULL, it will be freed by ff_end_frame() causing a crash.
This commit is contained in:
parent
cc12a94c36
commit
7afd42d9f2
@ -206,7 +206,6 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
|
|||||||
av_rescale_q((p - (int16_t *)insamples->data[0]) / nb_channels,
|
av_rescale_q((p - (int16_t *)insamples->data[0]) / nb_channels,
|
||||||
(AVRational){ 1, inlink->sample_rate },
|
(AVRational){ 1, inlink->sample_rate },
|
||||||
outlink->time_base);
|
outlink->time_base);
|
||||||
outlink->out_buf = outpicref;
|
|
||||||
linesize = outpicref->linesize[0];
|
linesize = outpicref->linesize[0];
|
||||||
memset(outpicref->data[0], 0, showwaves->h*linesize);
|
memset(outpicref->data[0], 0, showwaves->h*linesize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user