remove redundant av_init_packet after av_packet_unref.
av_packet_unref have call av_init_packet and reset the packet size.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) {
av_packet_unref(avpkt);
- av_init_packet(avpkt);
return 0;
}
if (ret < 0 || !*got_packet_ptr) {
av_packet_unref(avpkt);
- av_init_packet(avpkt);
goto end;
}
if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) {
av_packet_unref(avpkt);
- av_init_packet(avpkt);
- avpkt->size = 0;
return 0;
}