lavfi/subtitles: zero-init AVSubtitle.
This avoids invalid free when the stream id doesn't match the packet stream index. Ticket #2501
This commit is contained in:
parent
d382170c5d
commit
035a3792c2
1 changed files with 1 additions and 1 deletions
|
|
@ -323,7 +323,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
|
|||
pkt.size = 0;
|
||||
while (av_read_frame(fmt, &pkt) >= 0) {
|
||||
int i, got_subtitle;
|
||||
AVSubtitle sub;
|
||||
AVSubtitle sub = {0};
|
||||
|
||||
if (pkt.stream_index == sid) {
|
||||
ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_subtitle, &pkt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue