doc/examples/hw_decode: Remove useless NULL check
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 25 Mar 2018 18:21:37 +0000 (20:21 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 27 Mar 2018 21:01:44 +0000 (23:01 +0200)
Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
doc/examples/hw_decode.c

index 14fe08b..74a0ca3 100644 (file)
@@ -138,8 +138,7 @@ static int decode_write(AVCodecContext *avctx, AVPacket *packet)
     fail:
         av_frame_free(&frame);
         av_frame_free(&sw_frame);
-        if (buffer)
-            av_freep(&buffer);
+        av_freep(&buffer);
         if (ret < 0)
             return ret;
     }