summaryrefslogtreecommitdiff
path: root/doc/examples/filtering_audio.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-11-21 23:29:56 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-11-21 23:29:56 +0100
commit50a28b13936be3e62254d5a73ab2ca6ffb001bcf (patch)
tree8ebbd412fcecefe7a31644faa831ab07484f8693 /doc/examples/filtering_audio.c
parent98786aa2f05da5e785d9344a04767dfbf99c10f0 (diff)
doc/examples: do not check NULL values for avcodec_close()
avcodec_close() does nothing in case the argument is NULL. Simplify.
Diffstat (limited to 'doc/examples/filtering_audio.c')
-rw-r--r--doc/examples/filtering_audio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 35dd4e7d28..8a3d91f41d 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -248,8 +248,7 @@ int main(int argc, char **argv)
}
end:
avfilter_graph_free(&filter_graph);
- if (dec_ctx)
- avcodec_close(dec_ctx);
+ avcodec_close(dec_ctx);
avformat_close_input(&fmt_ctx);
av_frame_free(&frame);
av_frame_free(&filt_frame);