diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-04-25 00:56:36 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-09 17:05:02 +0200 |
commit | 3d6219b6dbf4f2686bc6a56377f2610a49ec1e31 (patch) | |
tree | 7f25285ac5965196d4c0b7a9745e459959abac3c | |
parent | 0a53c7016f77be5a6a6c9b045b1b57c48a594bce (diff) | |
download | ffmpeg-3d6219b6dbf4f2686bc6a56377f2610a49ec1e31.tar.gz |
lavfi/subtitles: zero-init AVSubtitle.
This avoids invalid free when the stream id doesn't match the packet
stream index.
Ticket #2501
(cherry picked from commit 035a3792c223d3b2bba79f38049bd6363b2d470d)
-rw-r--r-- | libavfilter/vf_subtitles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 7513e2402c..7ba883a168 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -332,7 +332,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx, const char *args) 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); |