[FFmpeg-cvslog] avformat/hdsenc: Remove redundant NULL pointer checks

Michael Niedermayer git at videolan.org
Fri Jan 9 16:55:02 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan  9 15:54:15 2015 +0100| [b1d223301f03741c87a0e0b755c108bbc2eafc93] | committer: Michael Niedermayer

avformat/hdsenc: Remove redundant NULL pointer checks

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 4052028..48810a9 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -139,11 +139,10 @@ static void hds_free(AVFormatContext *s)
         return;
     for (i = 0; i < s->nb_streams; i++) {
         OutputStream *os = &c->streams[i];
-        if (os->out)
-            avio_closep(&os->out);
+        avio_closep(&os->out);
         if (os->ctx && os->ctx_inited)
             av_write_trailer(os->ctx);
-        if (os->ctx && os->ctx->pb)
+        if (os->ctx)
             av_freep(&os->ctx->pb);
         if (os->ctx)
             avformat_free_context(os->ctx);



More information about the ffmpeg-cvslog mailing list