[FFmpeg-cvslog] avfilter/vf_mcdeint: avoid uninitilaized fields in AVPacket
Michael Niedermayer
git at videolan.org
Wed Jan 28 01:27:08 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 28 00:58:03 2015 +0100| [840570d27b71a16f7cb4b61c43bf80925634bf8f] | committer: Michael Niedermayer
avfilter/vf_mcdeint: avoid uninitilaized fields in AVPacket
This is also simpler
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=840570d27b71a16f7cb4b61c43bf80925634bf8f
---
libavfilter/vf_mcdeint.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
index 833ce35..9f1b3f5 100644
--- a/libavfilter/vf_mcdeint.c
+++ b/libavfilter/vf_mcdeint.c
@@ -174,7 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
MCDeintContext *mcdeint = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *outpic, *frame_dec;
- AVPacket pkt;
+ AVPacket pkt = {0};
int x, y, i, ret, got_frame = 0;
outpic = ff_get_video_buffer(outlink, outlink->w, outlink->h);
@@ -186,8 +186,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
inpic->quality = mcdeint->qp * FF_QP2LAMBDA;
av_init_packet(&pkt);
- pkt.data = NULL; // packet data will be allocated by the encoder
- pkt.size = 0;
ret = avcodec_encode_video2(mcdeint->enc_ctx, &pkt, inpic, &got_frame);
if (ret < 0)
More information about the ffmpeg-cvslog
mailing list