Message ID | 20191129051600.29619-3-lq@chinaffmpeg.org |
---|---|
State | Accepted |
Commit | 0f79a71353faeef6bc067a0cf3f2f982d732b9dd |
Headers | show |
On Fri, Nov 29, 2019 at 01:15:59PM +0800, Steven Liu wrote: > Signed-off-by: Steven Liu <lq@chinaffmpeg.org> > --- > libavformat/rtpenc_mpegts.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c > index 45ba6fffe5..7d7377db7a 100644 > --- a/libavformat/rtpenc_mpegts.c > +++ b/libavformat/rtpenc_mpegts.c > @@ -106,8 +106,7 @@ fail: > av_dict_free(&mpegts_ctx->metadata); > avformat_free_context(mpegts_ctx); > } > - if (rtp_ctx) > - avformat_free_context(rtp_ctx); > + avformat_free_context(rtp_ctx); this and all the other if() removials LGTM thx [...]
> 在 2019年11月30日,上午2:21,Michael Niedermayer <michael@niedermayer.cc> 写道: > > On Fri, Nov 29, 2019 at 01:15:59PM +0800, Steven Liu wrote: >> Signed-off-by: Steven Liu <lq@chinaffmpeg.org> >> --- >> libavformat/rtpenc_mpegts.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c >> index 45ba6fffe5..7d7377db7a 100644 >> --- a/libavformat/rtpenc_mpegts.c >> +++ b/libavformat/rtpenc_mpegts.c >> @@ -106,8 +106,7 @@ fail: >> av_dict_free(&mpegts_ctx->metadata); >> avformat_free_context(mpegts_ctx); >> } >> - if (rtp_ctx) >> - avformat_free_context(rtp_ctx); >> + avformat_free_context(rtp_ctx); > > this and all the other if() removials LGTM > All of them pushed. > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > it is not once nor twice but times without number that the same ideas make > their appearance in the world. -- Aristotle > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Steven Thanks
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index 45ba6fffe5..7d7377db7a 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -106,8 +106,7 @@ fail: av_dict_free(&mpegts_ctx->metadata); avformat_free_context(mpegts_ctx); } - if (rtp_ctx) - avformat_free_context(rtp_ctx); + avformat_free_context(rtp_ctx); rtp_mpegts_write_close(s); return ret; }
Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/rtpenc_mpegts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)