0

可以去隔行吗?我在关注

不幸的是

Java 运行时环境检测到一个致命错误:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) 在 pc=0x00007ff831ee94cd, pid=8808, tid=9184

JRE 版本:Java(TM) SE Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14) Java VM: Java HotSpot(TM) 64-Bit Server VM (25.91-b14 mixed mode windows-amd64 压缩 oops) 有问题框架:C [avfilter-6.dll+0x394cd]

当 init 调用 avfilter.avfilter_graph_create_filter。方法代码:

avfilter.AVFilterContext filter_src_ctx = null;
avfilter.AVFilterContext filter_sink_ctx = null;
 private void init_filtering(avcodec.AVCodecContext ctx, AVFrame frame) {
        avfilter.AVFilter buffer_src = avfilter.avfilter_get_by_name("buffer");
        avfilter.AVFilter buffer_sink = avfilter.avfilter_get_by_name("buffersink");
        avfilter.AVFilterInOut inputs = avfilter.avfilter_inout_alloc();
        avfilter.AVFilterInOut outputs = avfilter.avfilter_inout_alloc();

        String args = String.format("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
            frame.width(),
            frame.height(),
            frame.format(),
            ctx.time_base().num(),
            ctx.time_base().den(),
            ctx.sample_aspect_ratio().num(),
            ctx.sample_aspect_ratio().den());

        String description = "yadif=1:-1:0";
        avfilter.AVFilterGraph graph = avfilter.avfilter_graph_alloc();

        int result = avfilter.avfilter_graph_create_filter(filter_src_ctx, buffer_src, "in", args, null, graph);
        if (result < 0) {
            System.out.println("error");
        }

        avfilter.AVBufferSinkParams params = avfilter.av_buffersink_params_alloc();
        params.pixel_fmts().put(avutil.AV_PIX_FMT_NONE);

        result = avfilter.avfilter_graph_create_filter(filter_sink_ctx, buffer_sink, "out", null, params, graph);
        av_free(params);
        if (result < 0) {
            System.out.println("error");
        }
        inputs.name(new BytePointer("out"));
        inputs.filter_ctx(filter_sink_ctx);
        inputs.pad_idx(0);
        inputs.next(null);

        inputs.name(new BytePointer("in"));
        inputs.filter_ctx(filter_src_ctx);
        inputs.pad_idx(0);
        inputs.next(null);

        result = avfilter.avfilter_graph_parse_ptr(graph, description, inputs, outputs, null);
        if (result < 0) {
            System.out.println("error");
        }

        result = avfilter.avfilter_graph_config(graph, null);
        if (result < 0) {
            System.out.println("error");
        }
        isInitFilter = true;
    }

我会欣赏任何建议。(这是javacpp 中报告的问题的副本)

4

0 回答 0