Streampunk / beamcoder

Node.js native bindings to FFmpeg.
GNU General Public License v3.0
397 stars 76 forks source link

node SIGABRT when calling demuxer.read without await #29

Open alexandrucancescu opened 4 years ago

alexandrucancescu commented 4 years ago

Using:

demuxer.read().then();
demuxer.read().then();

Nodejs proccess finishes with Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Using await I cannot read enough frames from a demuxerStream, so I can't stack them using multiple promises.

scriptorian commented 4 years ago

The two asynchronous read calls will likely end up on two different threads which each call av_read_frame. This is not supported by FFmpeg hence perhaps we could usefully protect against it. Please could you give me more information about what your difficulty with using await is? Since there can be only one thread in the underlying code I'd like to understand where you think the problem lies.