diff options
Diffstat (limited to 'tests/api/api-flac-test.c')
-rw-r--r-- | tests/api/api-flac-test.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c index ae6a9316d8..3fea3258f3 100644 --- a/tests/api/api-flac-test.c +++ b/tests/api/api-flac-test.c @@ -223,20 +223,6 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, return 0; } -static int close_encoder(AVCodecContext **enc_ctx) -{ - avcodec_close(*enc_ctx); - av_freep(enc_ctx); - return 0; -} - -static int close_decoder(AVCodecContext **dec_ctx) -{ - avcodec_close(*dec_ctx); - av_freep(dec_ctx); - return 0; -} - int main(void) { AVCodec *enc = NULL, *dec = NULL; @@ -265,8 +251,8 @@ int main(void) return 1; if (run_test(enc, dec, enc_ctx, dec_ctx) != 0) return 1; - close_encoder(&enc_ctx); - close_decoder(&dec_ctx); + avcodec_free_context(&enc_ctx); + avcodec_free_context(&dec_ctx); } } |