encoder: set pts and dts to stream->nb_samples. closes #34