Skip to content

Commit

Permalink
doc/examples: remove unneeded NULL checks
Browse files Browse the repository at this point in the history
dst_file cannot be NULL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Sep 14, 2014
1 parent da2186b commit 68bca03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions doc/examples/resampling_audio.c
Expand Up @@ -199,8 +199,7 @@ int main(int argc, char **argv)
fmt, dst_ch_layout, dst_nb_channels, dst_rate, dst_filename);

end:
if (dst_file)
fclose(dst_file);
fclose(dst_file);

if (src_data)
av_freep(&src_data[0]);
Expand Down
3 changes: 1 addition & 2 deletions doc/examples/scaling_video.c
Expand Up @@ -132,8 +132,7 @@ int main(int argc, char **argv)
av_get_pix_fmt_name(dst_pix_fmt), dst_w, dst_h, dst_filename);

end:
if (dst_file)
fclose(dst_file);
fclose(dst_file);
av_freep(&src_data[0]);
av_freep(&dst_data[0]);
sws_freeContext(sws_ctx);
Expand Down

0 comments on commit 68bca03

Please sign in to comment.