[FFmpeg-cvslog] avformat/hdsenc: removed unused check of avformat_free_context

Steven Liu git at videolan.org
Sun Dec 1 18:10:42 EET 2019


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Fri Nov 29 13:15:58 2019 +0800| [e880f4fb387b00a29985dd0041b94e82358df219] | committer: Steven Liu

avformat/hdsenc: removed unused check of avformat_free_context

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Reviewed-by: Jun Zhao <barryjzhao at tencent.com>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e880f4fb387b00a29985dd0041b94e82358df219
---

 libavformat/hdsenc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 026530ac36..46f0026bce 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -146,8 +146,7 @@ static void hds_free(AVFormatContext *s)
             av_write_trailer(os->ctx);
         if (os->ctx)
             avio_context_free(&os->ctx->pb);
-        if (os->ctx)
-            avformat_free_context(os->ctx);
+        avformat_free_context(os->ctx);
         av_freep(&os->metadata);
         for (j = 0; j < os->nb_extra_packets; j++)
             av_freep(&os->extra_packets[j]);



More information about the ffmpeg-cvslog mailing list