doc/examples: do not check NULL values for avcodec_close()
avcodec_close() does nothing in case the argument is NULL. Simplify.
This commit is contained in:
@@ -369,10 +369,8 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
end:
|
||||
if (video_dec_ctx)
|
||||
avcodec_close(video_dec_ctx);
|
||||
if (audio_dec_ctx)
|
||||
avcodec_close(audio_dec_ctx);
|
||||
avcodec_close(video_dec_ctx);
|
||||
avcodec_close(audio_dec_ctx);
|
||||
avformat_close_input(&fmt_ctx);
|
||||
if (video_dst_file)
|
||||
fclose(video_dst_file);
|
||||
|
Reference in New Issue
Block a user