goto close;
}
- avcodec_register_all();
-
err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_VAAPI,
NULL, NULL, 0);
if (err < 0) {
fclose(fout);
av_frame_free(&sw_frame);
av_frame_free(&hw_frame);
- if (avctx)
- avcodec_free_context(&avctx);
+ avcodec_free_context(&avctx);
av_buffer_unref(&hw_device_ctx);
return err;