Works for me, here. I've also tested this editing an audio file and
transmitting it over the wire without any trouble. I've added one more
patch on top of your series to check the (undef) return value of
send_txstream.
I assumed that send_txstream croaks when it encounters an error.
Looking at the SWIG-generated sources, this seems to be the case.