mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 02:19:35 +00:00
avfilter/vf_mcdeint: avoid uninitilaized fields in AVPacket
This is also simpler Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6efd0ba977
commit
840570d27b
@ -174,7 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
|
|||||||
MCDeintContext *mcdeint = inlink->dst->priv;
|
MCDeintContext *mcdeint = inlink->dst->priv;
|
||||||
AVFilterLink *outlink = inlink->dst->outputs[0];
|
AVFilterLink *outlink = inlink->dst->outputs[0];
|
||||||
AVFrame *outpic, *frame_dec;
|
AVFrame *outpic, *frame_dec;
|
||||||
AVPacket pkt;
|
AVPacket pkt = {0};
|
||||||
int x, y, i, ret, got_frame = 0;
|
int x, y, i, ret, got_frame = 0;
|
||||||
|
|
||||||
outpic = ff_get_video_buffer(outlink, outlink->w, outlink->h);
|
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;
|
inpic->quality = mcdeint->qp * FF_QP2LAMBDA;
|
||||||
|
|
||||||
av_init_packet(&pkt);
|
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);
|
ret = avcodec_encode_video2(mcdeint->enc_ctx, &pkt, inpic, &got_frame);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user