Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not work in thread pool? #142

Open
jiamo opened this issue Mar 6, 2020 · 0 comments
Open

Can not work in thread pool? #142

jiamo opened this issue Mar 6, 2020 · 0 comments

Comments

@jiamo
Copy link

jiamo commented Mar 6, 2020

I got JVM assert (just crash). When I do use such sample code in thread pool.

public static SizeDuration get_duration(String fileName){
    // return duration, size
    SizeDuration errorLongs = new SizeDuration();
    try{
        final Demuxer demuxer = Demuxer.make();
        demuxer.open(fileName, null, false, true, null, null);

        errorLongs.duration = demuxer.getDuration() / 1000 ;
        errorLongs.size = demuxer.getFileSize();
    }catch (Exception e){
        e.printStackTrace();
        System.out.println(e);
    }
    return errorLongs;
}

When I move such code in main thread. All things done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant