On Tue, Sep 10, 2019 at 8:05 PM Andreas Rheinhardt <andreas.rheinha...@gmail.com> wrote: > > Jun Zhao: > > From: Jun Zhao <barryjz...@tencent.com> > > > > remove unnecessary packet reset in av_interleaved_write_frame > > > > Signed-off-by: Jun Zhao <barryjz...@tencent.com> > > --- > > libavformat/mux.c | 6 ++---- > > 1 files changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/libavformat/mux.c b/libavformat/mux.c > > index 0227c0d..9bac252 100644 > > --- a/libavformat/mux.c > > +++ b/libavformat/mux.c > > @@ -1227,11 +1227,9 @@ int av_interleaved_write_frame(AVFormatContext *s, > > AVPacket *pkt) > > for (;; ) { > > AVPacket opkt; > > int ret = interleave_packet(s, &opkt, pkt, flush); > > - if (pkt) { > > - memset(pkt, 0, sizeof(*pkt)); > > - av_init_packet(pkt); > > + if (pkt) > > pkt = NULL; > > - } > > + > > if (ret <= 0) //FIXME cleanup needed for ret<0 ? > > return ret; > > > I made a patchset [1] (that has already been partially pushed) whose > patch 11 deals with the memleak that happens on error in the above > code and also removes the unnecessary packet reset on success. > > - Andreas > > [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-August/248140.html > [2]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-August/248145.html > I didn't notice that pathset details, please goto the patchset, will drop the patch, Thanks _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".