If audio_in is NULL, we'll send a NULL frame to libav, to flush
the codec. In that case, we won't know how many samples the codec
will have used, so we use -1 (for don't know) when letting the
base class know about the buffer.