return 0;
}
-static int close_encoder(AVCodecContext *enc_ctx)
+static int close_encoder(AVCodecContext **enc_ctx)
{
- avcodec_close(enc_ctx);
- av_freep(&enc_ctx);
+ avcodec_close(*enc_ctx);
+ av_freep(enc_ctx);
return 0;
}
-static int close_decoder(AVCodecContext *dec_ctx)
+static int close_decoder(AVCodecContext **dec_ctx)
{
- avcodec_close(dec_ctx);
- av_freep(&dec_ctx);
+ avcodec_close(*dec_ctx);
+ av_freep(dec_ctx);
return 0;
}
return 1;
if (run_test(enc, dec, enc_ctx, dec_ctx) != 0)
return 1;
- close_encoder(enc_ctx);
- close_decoder(dec_ctx);
+ close_encoder(&enc_ctx);
+ close_decoder(&dec_ctx);
}
}