Skip to content

Commit

Permalink
videostreamer.c: dont call avformat_free_context
Browse files Browse the repository at this point in the history
avformat_close_input  frees context and all its contents and set it to NULL
https://www.ffmpeg.org/doxygen/3.3/group__lavf__decoding.html#gae804b99aec044690162b8b9b110236a4
  • Loading branch information
nickorzha committed Jul 18, 2019
1 parent 1412a95 commit 65a49b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions videostreamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ vs_destroy_input(struct VSInput * const input)
}

if (input->format_ctx) {
avformat_close_input(&input->format_ctx);
avformat_free_context(input->format_ctx);
avformat_close_input(&input->format_ctx);
}

free(input);
Expand Down

0 comments on commit 65a49b4

Please sign in to comment.